/**
 * SEOsuite.net - EMI Calculator Stylesheet
 * Lightweight, Bootstrap-first, High-Contrast Light Theme
 * Paragraph text strictly 16px, headings in px (zero rem units)
 */

/* Main Wrapper */
.emi-calc-wrapper {
    padding-top: 20px;
    padding-bottom: 40px;
}

/* Typography Overrides (Strictly px units, 16px paragraphs) */
.emi-calc-wrapper p,
.emi-calc-wrapper .emi-para,
.emi-seo-content p,
.emi-seo-content li,
.emi-faq-answer {
    font-size: 16px !important;
    line-height: 26px !important;
    color: #334155;
    margin-bottom: 14px;
}

.emi-hero h1,
.emi-hero-title {
    font-size: 32px !important;
    line-height: 40px !important;
    font-weight: 800;
    color: #0f172a;
    margin: 12px 0;
}

.emi-section-title,
.emi-card h2 {
    font-size: 24px !important;
    line-height: 32px !important;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px 0;
}

.emi-card h3,
.emi-sub-title {
    font-size: 20px !important;
    line-height: 28px !important;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.emi-card h4,
.emi-block-title {
    font-size: 18px !important;
    line-height: 24px !important;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

/* Hero Section */
.emi-hero {
    text-align: center;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 26px 20px 22px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.emi-hero-badge {
    display: inline-block;
    padding: 5px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loan Type Preset Pills */
.emi-preset-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.emi-preset-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emi-preset-tab.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

.emi-preset-tab:hover:not(.active) {
    background: #e2e8f0;
    color: #0f172a;
}

/* Main Tool Container Card */
.emi-main-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* Form Controls & Sliders */
.emi-form-group {
    margin-bottom: 22px;
}

.emi-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.emi-form-label {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0;
}

.emi-input-box {
    position: relative;
    max-width: 220px;
}

.emi-input {
    height: 44px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    text-align: right;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.emi-input:focus {
    background: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.emi-input-prefix,
.emi-input-suffix {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
}

.emi-input-prefix {
    left: 10px;
}

.emi-input-suffix {
    right: 10px;
}

.emi-words-hint {
    font-size: 13px;
    color: #0284c7;
    font-weight: 600;
    margin-top: 4px;
    text-align: right;
}

/* Range Sliders */
.emi-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 5px;
    outline: none;
    margin: 12px 0 6px 0;
    cursor: pointer;
}

.emi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0284c7;
    border: 2.5px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.emi-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.emi-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0284c7;
    border: 2.5px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.emi-slider-limits {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

/* Tenure Unit Switcher (Years vs Months) */
.emi-unit-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 10px;
}

.emi-unit-btn {
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.emi-unit-btn.active {
    background: #0284c7;
    color: #ffffff;
}

/* Primary Result Hero Card */
.emi-result-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    border: 1.5px solid #93c5fd;
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.emi-result-label {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #0369a1;
    margin-bottom: 4px;
}

.emi-result-value {
    font-size: 38px;
    font-weight: 800;
    color: #0f172a;
    line-height: 44px;
}

.emi-result-sub {
    font-size: 14px;
    color: #475569;
    font-weight: 600;
    margin-top: 4px;
}

/* Summary Grid */
.emi-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.emi-summary-item {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
}

.emi-summary-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
}

.emi-summary-val {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 24px;
}

/* Donut Chart Container */
.emi-chart-box {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.emi-chart-svg {
    width: 170px;
    height: 170px;
    transform: rotate(-90deg);
}

.emi-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emi-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.emi-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.emi-legend-dot.principal {
    background: #0284c7;
}

.emi-legend-dot.interest {
    background: #f59e0b;
}

/* Prepayment & Advanced Accordion */
.emi-adv-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.emi-adv-toggle-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #0284c7;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
}

.emi-adv-content {
    display: none;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
    margin-top: 10px;
}

.emi-adv-box.open .emi-adv-content {
    display: block;
}

.emi-adv-box.open .emi-adv-toggle-btn .fa {
    transform: rotate(180deg);
}

/* Savings Alert Banner */
.emi-savings-banner {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 12px;
    display: none;
}

.emi-savings-title {
    font-size: 16px;
    font-weight: 800;
    color: #065f46;
    margin-bottom: 4px;
}

.emi-savings-desc {
    font-size: 14px;
    color: #047857;
    font-weight: 600;
    margin: 0;
}

/* Amortization Schedule Card */
.emi-schedule-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.emi-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.emi-schedule-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.emi-schedule-tab {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.emi-schedule-tab.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.emi-table-container {
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.emi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px !important;
}

.emi-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 2px solid #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 10;
}

.emi-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 15px !important;
}

.emi-table tr:hover {
    background: #f8fafc;
}

/* Action Buttons */
.emi-btn-primary {
    background: #0284c7;
    border: 1.5px solid #0369a1;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.emi-btn-primary:hover {
    background: #0369a1;
    color: #ffffff;
}

.emi-btn-secondary {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emi-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* SEO Content & Accordion */
.emi-seo-content {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 24px;
    margin-top: 30px;
}

.emi-table-ref {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px 0;
    font-size: 16px !important;
}

.emi-table-ref th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    text-align: left;
}

.emi-table-ref td {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.emi-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.emi-faq-question {
    background: #f8fafc;
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    width: 100%;
    text-align: left;
}

.emi-faq-question:hover {
    background: #f1f5f9;
}

.emi-faq-question .fa {
    transition: transform 0.2s ease;
    color: #0284c7;
}

.emi-faq-answer {
    padding: 16px 18px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.emi-faq-item.open .emi-faq-answer {
    display: block;
}

.emi-faq-item.open .emi-faq-question .fa {
    transform: rotate(180deg);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .emi-hero h1,
    .emi-hero-title {
        font-size: 24px !important;
        line-height: 32px !important;
    }
    .emi-result-value {
        font-size: 28px !important;
        line-height: 34px !important;
    }
    .emi-summary-grid {
        grid-template-columns: 1fr;
    }
    .emi-chart-box {
        flex-direction: column;
    }
    .emi-label-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .emi-input-box {
        max-width: 100%;
        width: 100%;
    }
}

