/**
 * Website Calculator Elementor Widget Styles
 * Enhanced version with full Elementor styling support
 */

.wc-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.wc-header {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    padding: 30px;
    text-align: center;
}

.wc-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 300;
    margin-top: 0;
}

.wc-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.wc-calculator-section {
    padding: 30px;
}

.wc-input-group {
    margin-bottom: 25px;
}

.wc-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.wc-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.wc-input-group input:focus {
    outline: none;
    border-color: #6c757d;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

.wc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.wc-result-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wc-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.wc-result-card h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 1.3rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.wc-cost-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.wc-cost-table th,
.wc-cost-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    word-wrap: break-word;
}

.wc-cost-table th {
    background-color: white;
    font-weight: 600;
    color: black;
    font-size: 0.8rem;
}

.wc-cost-table td {
    font-size: 0.8rem;
}

.wc-total-row {
    font-weight: bold;
    background-color: #f1f3f4;
}

.wc-savings-section {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.wc-savings-section h3 {
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 1.4rem;
}

.wc-savings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.wc-savings-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.wc-savings-item .wc-year {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
    color: #fff;
}

.wc-savings-item .wc-amount {
    font-size: 1.3rem;
    font-weight: bold;
}

.wc-positive {
    color: #28a745;
}

.wc-negative {
    color: #dc3545;
}

.wc-optional-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
}

.wc-optional-section h4 {
    color: #495057;
    margin-bottom: 10px;
    margin-top: 0;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .wc-container {
        margin: 10px;
        border-radius: 8px;
    }

    .wc-header {
        padding: 20px;
    }

    .wc-header h1 {
        font-size: 1.8rem;
    }

    .wc-calculator-section {
        padding: 20px;
    }

    .wc-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wc-savings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wc-cost-table {
        font-size: 0.7rem;
    }

    .wc-cost-table th,
    .wc-cost-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .wc-savings-grid {
        grid-template-columns: 1fr;
    }
    
    .wc-cost-table th,
    .wc-cost-table td {
        padding: 6px 4px;
        font-size: 0.65rem;
    }
}

/* Elementor Editor Specific Styles */
.elementor-editor-active .wc-container {
    pointer-events: none;
}

.elementor-editor-active .wc-input-group input {
    pointer-events: auto;
}

/* Enhanced Hover Effects */
.wc-result-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.wc-savings-item {
    transition: all 0.3s ease;
}

.wc-savings-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* Focus States */
.wc-input-group input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

/* Animation for number changes */
.wc-amount,
.wc-cost-table td {
    transition: color 0.3s ease;
}

/* Grid Auto-fit Enhancement */
.wc-results-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

/* Better table responsiveness */
@media (max-width: 600px) {
    .wc-cost-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Accessibility improvements */
.wc-input-group input:focus-visible {
    outline: 2px solid #6c757d;
    outline-offset: 2px;
}

.wc-result-card:focus-within {
    outline: 2px solid #6c757d;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .wc-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .wc-result-card {
        break-inside: avoid;
    }
}

