/* Technix Leasing Calculator - Base Styles */

@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* Container */
.hnbf-calculator-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Raleway', sans-serif;
}

/* Calculator Wrapper - Single Card Layout */
.hnbf-calc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
    background: transparent;
    border-radius: 8px;
    box-shadow: none;
    padding: 0;
    color: #FFFFFF;
}

/* Result Panel - Top Section */
.hnbf-result-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    min-height: 360px;
    border-radius: 8px 0 0 8px;
    background: linear-gradient(135deg, #006BB6, #004A99);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hnbf-result-content {
    width: 100%;
}

.hnbf-result-label {
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 15px 0;
    color: #FFFFFF;
    opacity: 0.95;
}

.hnbf-result-value {
    font-size: 56px;
    font-weight: 700;
    margin: 15px 0;
    color: #FFFFFF;
    line-height: 1.2;
}

.hnbf-result-subtext {
    font-size: 18px;
    font-weight: 400;
    margin: 10px 0;
    color: #FFFFFF;
    opacity: 0.9;
}

.hnbf-disclaimer {
    font-size: 13px;
    font-weight: 300;
    margin: 15px 0 0 0;
    color: #FFFFFF;
    opacity: 0.8;
}

/* Calculator Form Section */
.hnbf-calculator-form-section {
    background-color: #f7f7f7;
    padding: 40px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    color: #333333;
}

/* When form is on white card, use darker labels */
.hnbf-calculator-form-section .hnbf-input-label {
    color: #8a8a8a;
}

/* Ensure input fields contrast on the white card */
.hnbf-calculator-form-section .hnbf-input-field {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #e2e2e2;
}

/* Calculator Panel - Form Area */
.hnbf-calculator-panel {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.hnbf-calc-form {
    width: 100%;
}

/* Form Groups */
.hnbf-form-group {
    margin-bottom: 30px;
}

.hnbf-input-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #FFFFFF;
    margin-bottom: 10px;
}

/* Input Fields */
.hnbf-input-field {
    width: 100%;
    padding: 15px 20px;
    font-size: 20px;
    font-weight: 500;
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.hnbf-input-field:focus {
    border-color: #0072BC;
    box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}

.hnbf-duration-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Slider Container */
.hnbf-slider-container {
    position: relative;
    padding-top: 40px;
    padding-left: 12px; /* align inner track with labels */
    padding-right: 12px;
}

.hnbf-slider-value-display {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #0072BC;
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 114, 188, 0.3);
    transition: left 0.2s ease;
}

/* Range Slider */
.hnbf-slider {
    --thumb-d: 30px; /* total visual thumb diameter (includes borders) */
    width: 100%;
    height: 6px;
    background: #D0D0D0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0; /* no horizontal margin so track spans the full inner container */
    box-sizing: border-box;
}

.hnbf-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--thumb-d);
    height: var(--thumb-d);
    background-color: #FDB913;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.hnbf-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.hnbf-slider::-moz-range-thumb {
    width: var(--thumb-d);
    height: var(--thumb-d);
    background-color: #FDB913;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.hnbf-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Slider Labels */
.hnbf-slider-labels {
    position: relative;
    margin-top: 12px;
    height: 36px;
    pointer-events: none;
}

.hnbf-slider-labels span {
    position: absolute;
    top: 16px;
    left: 0;
    transform: translateX(0);
    font-size: 12px;
    color: #444444;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.hnbf-slider-labels.ready span {
    opacity: 1;
}

.hnbf-slider-labels span::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 12px;
    background: #666666;
    border-radius: 1px;
}

/* Buttons */
.hnbf-btn {
    padding: 14px 35px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hnbf-btn-calculate {
    background-color: #FDB913;
    color: #000000;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.hnbf-btn-calculate:hover {
    background-color: #FFFFFF;
    color: #000000;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Remove focus styles for calculate button to avoid color/outline changes */
.hnbf-btn-calculate:focus,
.hnbf-btn-calculate:focus-visible {
    outline: none;
    box-shadow: none;
    background-color: #FDB913;
    color: #000000;
}

.hnbf-btn-apply {
    background-color: #FDB913;
    color: #000000;
}

.hnbf-btn-apply:hover {
    background-color: #FFFFFF;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.hnbf-arrow {
    font-size: 18px;
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 991px) {
    .hnbf-calc-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .hnbf-result-panel {
        order: 1;
    }
    
    .hnbf-calculator-panel {
        order: 2;
    }
}

@media (max-width: 768px) {
    .hnbf-calculator-container {
        padding: 15px;
        margin: 20px auto;
    }
    
    .hnbf-result-panel {
        padding: 40px 25px;
        min-height: 300px;
    }
    
    .hnbf-result-value {
        font-size: 44px;
    }
    
    .hnbf-calculator-panel {
        padding: 30px 20px;
    }
    
    .hnbf-input-field {
        font-size: 18px;
        padding: 12px 16px;
    }
    
    .hnbf-form-group {
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .hnbf-result-value {
        font-size: 36px;
    }
    
    .hnbf-result-label {
        font-size: 18px;
    }
    
    .hnbf-result-subtext {
        font-size: 16px;
    }
    
    .hnbf-btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .hnbf-result-panel {
        padding: 24px 16px;
        min-height: 260px;
    }

    /* Tighter ruler layout on small screens */
    .hnbf-slider-container {
        padding-left: 6px;
        padding-right: 6px;
    }

    .hnbf-slider {
        --thumb-d: 26px;
    }

    .hnbf-slider-labels {
        margin-top: 8px;
        height: 32px;
    }

    .hnbf-slider-labels span {
        top: 12px;
        font-size: 10px;
    }

    .hnbf-slider-labels span::before {
        height: 10px;
        top: -12px;
    }
}

/* Animation for value changes */
.hnbf-emi-amount,
.hnbf-rate-display {
    transition: all 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hnbf-result-value.updating {
    animation: pulse 0.4s ease;
}
