/* ===================================
   LOAD CALCULATOR MODAL STYLES
   Harmain Solar Energy - Professional Design
   =================================== */

/* Modal Backdrop */
.load-calculator-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.load-calculator-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.load-calculator-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 300ms ease;
}

.load-calculator-backdrop.active .load-calculator-modal {
    transform: scale(1);
}

/* Modal Header */
.load-calculator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 32px 24px 32px;
    border-bottom: 1px solid #f1f1f1;
}

.load-calculator-title {
    font-family: 'Manrope', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #030300;
    margin: 0;
}

.load-calculator-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #636363;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 150ms ease, color 150ms ease;
}

.load-calculator-close:hover {
    background-color: #f5f5f5;
    color: #030300;
}

/* Modal Content */
.load-calculator-content {
    padding: 24px 32px 32px 32px;
}

.load-calculator-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #636363;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* Appliance Grid */
.appliance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .appliance-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .appliance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Appliance Capsule */
.appliance-capsule {
    position: relative;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 50px;
    padding: 16px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #030300;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appliance-capsule:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #4eb84a;
}

.appliance-capsule.selected {
    background: #4eb84a;
    border-color: #4eb84a;
    color: white;
    animation: capsule-select 300ms ease;
}

.appliance-capsule.counting {
    animation: capsule-bounce 300ms ease;
}

/* Count Badge */
.count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: white;
    border: 2px solid #4eb84a;
    color: #030300;
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.8);
    transition: all 200ms ease;
}

.count-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.count-badge.animate {
    animation: count-bounce 300ms ease;
}

/* Large count badges for 3+ digits */
.count-badge.large {
    min-width: 36px;
    height: 36px;
    font-size: 11px;
}

.count-badge.extra-large {
    min-width: 42px;
    height: 42px;
    font-size: 10px;
}

/* Load Summary Section */
.load-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.load-summary-title {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #030300;
    margin: 0 0 12px 0;
}

.total-load {
    font-family: 'Manrope', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #4eb84a;
    margin: 0 0 8px 0;
    transition: all 200ms ease;
}

.total-load.updating {
    animation: load-roll 500ms ease;
}

.load-details {
    font-size: 14px;
    color: #636363;
    margin: 0;
}

/* Quote Button */
.quote-button {
    width: 100%;
    background: #4eb84a;
    color: white;
    border: none;
    border-radius: 32px;
    padding: 16px 24px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quote-button:hover {
    background: #419b3e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 184, 74, 0.3);
}

.quote-button:active {
    transform: scale(0.98);
}

.quote-button:disabled {
    background: #e5e5e5;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* WhatsApp Icon */
.whatsapp-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Animations */
@keyframes capsule-select {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes capsule-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes count-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes load-roll {
    0% { transform: scale(1); opacity: 1; }
    30% { transform: scale(1.1); opacity: 0.8; }
    70% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.cost-amount.updating {
    animation: load-roll 500ms ease;
}

/* Responsive Mobile Adjustments */
@media (max-width: 480px) {
    .load-calculator-header,
    .load-calculator-content {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .appliance-capsule {
        padding: 12px 16px;
        font-size: 13px;
        min-height: 48px;
    }
    
    .load-summary {
        padding: 20px;
    }
    
    .total-load {
        font-size: 32px;
    }
    
    .quote-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Smooth scrollbar for modal */
.load-calculator-modal::-webkit-scrollbar {
    width: 6px;
}

.load-calculator-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.load-calculator-modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.load-calculator-modal::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus states for accessibility */
.appliance-capsule:focus {
    outline: 2px solid #4eb84a;
    outline-offset: 2px;
}

.quote-button:focus {
    outline: 2px solid #4eb84a;
    outline-offset: 2px;
}

.load-calculator-close:focus {
    outline: 2px solid #4eb84a;
    outline-offset: 2px;
}

/* Loading state animation */
.quote-button.loading {
    pointer-events: none;
}

.quote-button.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Interactive Demo Styles */
.demo-capsule {
    transition: all 200ms ease;
    border: 2px solid #e5e5e5;
}

.demo-capsule.demo-selected {
    background: #4eb84a;
    border-color: #4eb84a;
    color: white;
}

.demo-capsule.demo-counting {
    animation: demo-bounce 400ms ease;
}

.demo-click-indicator {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 300ms ease;
    opacity: 0.6;
}

.demo-click-indicator.left-click {
    background: rgba(78, 184, 74, 0.1);
    border: 2px solid rgba(78, 184, 74, 0.3);
}

.demo-click-indicator.right-click {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.demo-click-indicator.active {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(78, 184, 74, 0.3);
}

.demo-click-indicator.right-click.active {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.demo-click-indicator.pulse {
    animation: demo-pulse 600ms ease;
}

@keyframes demo-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes demo-pulse {
    0% { 
        transform: scale(1); 
        opacity: 0.6; 
    }
    50% { 
        transform: scale(1.2); 
        opacity: 1; 
        box-shadow: 0 0 25px rgba(78, 184, 74, 0.5);
    }
    100% { 
        transform: scale(1); 
        opacity: 0.6; 
    }
}

/* Calculation Info Button */
.calculation-info-btn {
    background: none;
    border: none;
    color: #4eb84a;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
    vertical-align: middle;
}

.calculation-info-btn:hover {
    background: rgba(78, 184, 74, 0.1);
    transform: scale(1.1);
}

.calculation-info-btn:active {
    transform: scale(0.95);
}

.calculation-info-btn svg {
    transition: all 150ms ease;
}

.calculation-info-btn:hover svg {
    color: #419b3e;
}

/* Calculation Info Modal */
.calculation-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.calculation-info-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modal-fade-in 300ms ease;
}

.calculation-info-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modal-scale-in 300ms ease;
}

.calculation-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f1f1f1;
}

.calculation-info-header h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #030300;
    margin: 0;
}

.calculation-info-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #636363;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 150ms ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculation-info-close:hover {
    background-color: #f5f5f5;
    color: #030300;
}

.calculation-info-body {
    padding: 16px 24px 24px 24px;
}

.calculation-step {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f1f1;
}

.calculation-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.calculation-step strong {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #030300;
    display: block;
    margin-bottom: 8px;
}

.calculation-value {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #4eb84a;
    margin: 4px 0;
}

.calculation-formula {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #030300;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 4px 0;
    font-family: monospace;
}

.calculation-note {
    font-size: 14px;
    color: #636363;
    margin-top: 4px;
    line-height: 1.4;
}

.calculation-result {
    background: #f0f8f0;
    border: 2px solid #4eb84a;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.calculation-result strong {
    font-size: 18px;
    color: #4eb84a;
}

/* Modal animations */
@keyframes modal-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes modal-scale-in {
    0% { 
        transform: scale(0.9); 
        opacity: 0; 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .calculation-info-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .calculation-info-header,
    .calculation-info-body {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .calculation-formula {
        font-size: 14px;
        word-break: break-all;
    }
}

/* ===== COST ESTIMATION STYLES ===== */

/* Cost Estimate Button */
.cost-estimate-button {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 200ms ease;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.cost-estimate-button:hover {
    background: linear-gradient(135deg, #4eb84a 0%, #419b3e 100%);
    border-color: #4eb84a;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 184, 74, 0.2);
}

.cost-estimate-button:active {
    transform: translateY(0px) scale(0.98);
}

.cost-estimate-button svg {
    transition: all 200ms ease;
}

/* Cost Estimation Section */
.cost-estimate-section {
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: cost-section-expand 400ms ease-in-out;
}

@keyframes cost-section-expand {
    0% {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

.cost-estimate-title {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 20px 0;
    text-align: center;
}

.rough-estimate-text {
    font-size: 12px;
    font-weight: 400;
    color: #6c757d;
    font-style: italic;
}

/* System Type Selector */
.system-type-selector {
    margin-bottom: 24px;
}

.system-type-option {
    margin-bottom: 12px;
}

.system-type-option input[type="radio"] {
    display: none;
}

.system-type-option label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 200ms ease;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    position: relative;
}

.system-type-option label::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    margin-right: 12px;
    transition: all 200ms ease;
    flex-shrink: 0;
}

.system-type-option input[type="radio"]:checked + label {
    border-color: #4eb84a;
    background: rgba(78, 184, 74, 0.08);
    color: #2d5a30;
}

.system-type-option input[type="radio"]:checked + label::before {
    border-color: #4eb84a;
    background: #4eb84a;
    box-shadow: inset 0 0 0 3px white;
}

.system-type-option label:hover {
    border-color: #4eb84a;
    background: rgba(78, 184, 74, 0.04);
}

.system-type-desc {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
    margin-left: 4px;
}

/* Cost Display Hero */
.cost-display {
    text-align: center;
    margin-bottom: 32px;
    padding: 0;
    background: none;
    border: none;
}

.cost-hero {
    background: linear-gradient(135deg, rgba(78, 184, 74, 0.12) 0%, rgba(78, 184, 74, 0.06) 100%);
    border: 2px solid rgba(78, 184, 74, 0.25);
    border-radius: 16px;
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
}

.cost-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(78, 184, 74, 0.6) 50%, transparent 100%);
}

.cost-label {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #419b3e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.cost-amount {
    font-family: 'Manrope', sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #2d5a30;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.1;
}

.cost-subtext {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #419b3e;
    margin-bottom: 16px;
    opacity: 0.9;
}

.value-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4eb84a 0%, #419b3e 100%);
    color: white;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(78, 184, 74, 0.3);
}

/* ===== INACTIVE COST BREAKDOWN STYLES ===== 
   These styles are preserved but inactive to avoid CSS loading overhead.
   Uncomment the entire block below to restore breakdown functionality.

.cost-breakdown {
    text-align: left;
    margin-top: 16px;
}

.cost-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(78, 184, 74, 0.15);
}

.cost-breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #495057;
    flex: 1;
}

.breakdown-amount {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2d5a30;
    white-space: nowrap;
    margin-left: 12px;
}

.cost-breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 8px 0;
    margin-top: 8px;
    border-top: 2px solid rgba(78, 184, 74, 0.2);
    background: rgba(78, 184, 74, 0.08);
    border-radius: 6px;
    padding: 12px;
}

.cost-breakdown-total .breakdown-label,
.cost-breakdown-total .breakdown-amount {
    font-size: 16px;
}

.cost-breakdown.updating {
    animation: load-roll 500ms ease;
}

END OF INACTIVE BREAKDOWN STYLES ===== */

/* What's Included Section */
.whats-included {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(78, 184, 74, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(78, 184, 74, 0.15);
}

.whats-included h5 {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #2d5a30;
    margin: 0 0 12px 0;
}

.whats-included ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.whats-included li {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: #495057;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whats-included li::before {
    content: '✓';
    color: #4eb84a;
    font-weight: 700;
    font-size: 14px;
}

/* Disclaimer Box */
.disclaimer-box {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.disclaimer-icon {
    font-size: 18px;
    color: #f59e0b;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.disclaimer-text {
    flex: 1;
    text-align: left;
}

.disclaimer-text strong {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    display: block;
    margin-bottom: 8px;
    text-align: left;
}

.disclaimer-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.disclaimer-text li {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #92400e;
    padding: 2px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
}

.disclaimer-text li::before {
    content: '•';
    color: #f59e0b;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Mobile Responsive Adjustments for Cost Estimation */
@media (max-width: 480px) {
    .cost-estimate-section {
        padding: 20px 16px;
        margin-top: 16px;
    }
    
    .cost-estimate-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .cost-display {
        margin-bottom: 24px;
    }
    
    .cost-hero {
        padding: 20px 12px;
        border-radius: 12px;
    }
    
    .cost-amount {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .cost-label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .cost-subtext {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .value-badge {
        font-size: 11px;
        padding: 5px 14px;
    }
    
    .system-type-option label {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    
    .disclaimer-box {
        padding: 12px 10px;
        gap: 8px;
    }
    
    .disclaimer-icon {
        font-size: 16px;
    }
    
    .disclaimer-text li {
        font-size: 11px;
        gap: 4px;
    }
    
    .whats-included {
        padding: 14px 12px;
    }
    
    .whats-included li {
        font-size: 12px;
        text-align: left;
        justify-content: flex-start;
    }
    
    .whats-included ul {
        text-align: left;
    }
}