/* Admiral Finance Theme - Loan Calculator CSS */
/* Based on Admiral Finance brand colors and styling */

/* Main container styling */
#ql-loan-calculator {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    margin: 0 auto;
    background: #FFFFFF;
    padding: 3.4vw 4.2vw;
    border-radius: 20px;
    box-shadow: 4px 8px 16px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
   /* border-top: 4px solid #1e3a5f; /* Admiral navy blue accent */
}

/* Loan disclaimer text */
#ql-loan-calculator .loan-disclaimer {
    font-size: 14px !important;
    color: #666 !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
    font-style: italic !important;
    text-align: center !important;
}

.loan-calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 80px;
}

.loan-calculator-left {
    flex: 1;
    min-width: 300px;
}

.loan-calculator-right {
    flex: 1;
    min-width: 300px;
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4f8 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e0f2f1;
}

/* Loan amount section */
.loan-amount-section h3,
.loan-term-section h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 24px;
    margin-bottom: 15px;
    margin-top: 20px!important;
    font-weight: 600;
    text-align: center;
    color: #1e3a5f; /* Admiral navy blue */
}

.input-slider-container {
    margin-bottom: 15px;
    position: relative;
}

#ql-amount {
    width: 100%;
    padding: 15px 20px 15px 45px;
    font-size: 24px;
    font-weight: bold;
    color: #1e3a5f;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%); /* Light green gradient */
    border: 2px solid #4caf50; /* Admiral green */
    border-radius: 8px;
    text-align: left;
    outline: none;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#ql-amount:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Dollar sign prefix */
.input-slider-container::before {
    content: '$';
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #1e3a5f;
    z-index: 1;
    pointer-events: none;
}

#ql-amount-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #1e3a5f 0%, #4caf50 50%, #81c784 100%); /* Navy to green gradient */
    border-radius: 4px;
    outline: none;
    margin: 20px 0;
    cursor: ew-resize;
}

/* Chrome/Safari slider thumb */
#ql-amount-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ff6f00; /* Admiral orange */
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    position: relative;
    transition: all 0.3s ease;
}

#ql-amount-slider::-webkit-slider-thumb:hover {
    background: #e65100;
    transform: scale(1.1);
}

/* Firefox slider thumb */
#ql-amount-slider::-moz-range-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ff6f00;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#ql-amount-slider::-moz-range-thumb:hover {
    background: #e65100;
}

/* Firefox slider track */
#ql-amount-slider::-moz-range-track {
    height: 8px;
    background: linear-gradient(to right, #1e3a5f 0%, #4caf50 50%, #81c784 100%);
    border-radius: 4px;
}

/* Error message */
.loan-error-message {
    color: #d32f2f;
    background-color: #fce4e4;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 14px;
    display: none;
}

.loan-error-message.visible {
    display: block;
}

#ql-amount.invalid {
    border-color: #d32f2f;
    background-color: #fff8f8;
}

/* Term selection buttons */
.term-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.term-button {
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4f8 100%);
    border: 2px solid #4caf50; /* Admiral green border */
    color: #1e3a5f; /* Admiral navy text */
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
    white-space: nowrap;
}

.term-button:hover {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-color: #2e7d32;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.term-button.active {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%); /* Admiral navy gradient */
    border-color: #1e3a5f;
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.term-button.active:hover {
    background: linear-gradient(135deg, #2c5282 0%, #3d6ba3 100%);
    border-color: #2c5282;
}

/* Results section */
.result-summary {
    margin-bottom: 15px;
    text-align: center!important;
}

.result-summary h4 {
    margin-top: 0px!important;
    color: #1e3a5f;
    font-weight: 600;
}

#ql-result-term {
    font-size: 20px;
    color: #1e3a5f;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
}

.payment-amount {
    margin-bottom: 20px;
}

#ql-result-payment {
    color: #4caf50; /* Admiral green for payment amount */
    font-size: 30px;
    font-weight: 600;
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.details-toggle {
    color: #1e3a5f;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.details-toggle:hover {
    color: #4caf50;
    text-decoration: underline;
}

/* Details section */
#ql-details {
    display: none;
    margin-top: 15px;
    margin-bottom: 20px;
}

#ql-details.visible {
    display: block;
}

#ql-details-content table {
    border-collapse: collapse;
    width: 100%;
    max-width: 380px;
    margin: 20px auto;
    font-size: 16px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#ql-details-content .text__container table th, 
#ql-details-content .text__container table td {
    border-top: none!important;
}

.text__container table th, 
.text__container table td {
    border-bottom: none!important;
}

#ql-details-content td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0f2f1;
    background: #fafafa;
    transition: background-color 0.3s ease;
}

#ql-details-content td:first-child {
    width: 60%;
    color: #1e3a5f;
    font-weight: 500;
}

#ql-details-content td:last-child {
    width: 40%;
    color: #2e7d32;
    font-weight: 600;
}

tr:hover {
    background: #e8f5e8!important;
}

/* Apply now button - Admiral orange theme */
#ql-loan-calculator .apply-now-container {
    text-align: center !important;
    margin: 60px 0px 0px 0px !important;
}

#ql-loan-calculator .apply-now-button {
    display: inline-block !important;
    padding: 18px 40px !important;
    text-decoration: none !important;
    border-radius: 25px !important;
    background: linear-gradient(135deg, #ff6f00 0%, #ff8f00 100%) !important; /* Admiral orange gradient */
    color: white !important;
    font-weight: bold !important;
    font-size: 20px !important;
    text-align: center !important;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
}

#ql-loan-calculator .apply-now-button:hover {
    background: linear-gradient(135deg, #e65100 0%, #f57c00 100%) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(255, 111, 0, 0.4) !important;
}

#ql-loan-calculator .apply-now-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.3) !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .loan-calculator-container {
        gap: 40px;
    }
    
    .loan-calculator-left,
    .loan-calculator-right {
        min-width: 100%;
    }
    
    #ql-loan-calculator {
        padding: 20px;
    }
    
    .term-buttons {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }
}

/* Additional Admiral Finance brand touches */
#ql-loan-calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a5f 0%, #4caf50 50%, #ff6f00 100%);
    border-radius: 16px 16px 0 0;
}

#ql-loan-calculator {
    position: relative;
}
