/* ======================================
   UK Financial Calculators Pro
   Mortgage Calculator
====================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f4f7fb;
    font-family: Inter, Arial, sans-serif;
}

.ukfc-wrapper {
    max-width: 1400px;
    width: calc(100% - 24px);
    margin: 24px auto 40px;
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
    gap: 30px;
    align-items: start;
    overflow: hidden;
}

.ukfc-left {
    background: #ffffff;
    padding: 35px;
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .08);
    width: 100%;
}

.ukfc-hero {
    margin-bottom: 24px;
}

.ukfc-hero-badge {
    display: inline-block;
    padding: 8px 14px;
    background: #e8faf6;
    color: #11967c;
    font-weight: 700;
    border-radius: 999px;
    margin-bottom: 12px;
}

.ukfc-hero h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #152238;
    font-weight: 700;
    line-height: 1.2;
}

.ukfc-hero p {
    color: #5b6472;
    font-size: 16px;
    line-height: 1.6;
}

.ukfc-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
}

.ukfc-toggle button {
    flex: 1;
    height: 50px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    background: #edf2f7;
    transition: .3s;
    color: #334155;
}

.ukfc-toggle .active {
    background: #17b394;
    color: #fff;
}

.ukfc-field {
    margin-bottom: 20px;
}

.ukfc-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #444;
}

.ukfc-icon {
    font-size: 18px;
}

.ukfc-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e8faf6;
    color: #11967c;
    font-size: 12px;
    cursor: help;
    position: relative;
}

.ukfc-info:hover::after,
.ukfc-info:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #152238;
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 2;
}

.ukfc-field input {
    width: 100%;
    height: 56px;
    border: 2px solid #E7EAF3;
    border-radius: 12px;
    padding: 14px 15px;
    font-size: 17px;
    transition: .3s;
    outline: none;
    background: #fff;
}

.ukfc-field input:focus {
    border-color: #17b394;
    box-shadow: 0 0 0 4px rgba(23, 179, 148, .15);
}

input[type=range] {
    width: 100%;
    margin-top: 12px;
    accent-color: #17b394;
    cursor: pointer;
}

.ukfc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.ukfc-btn {
    flex: 1;
    min-width: 180px;
    height: 56px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #17b394 0%, #0f8f7b 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}

.ukfc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(23, 179, 148, .2);
}

.ukfc-link-btn {
    padding: 0 16px;
    height: 46px;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-weight: 600;
}

.ukfc-right {
    display: flex;
    flex-direction: column;
}

.ukfc-results-panel {
    background: linear-gradient(135deg, #152238 0%, #1d3557 100%);
    color: #fff;
    padding: 28px;
    border-radius: 22px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, .16);
    position: sticky;
    top: 20px;
}

.ukfc-results-header {
    font-size: 17px;
    font-weight: 700;
    color: #a8b8cc;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ukfc-main-result {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 16px;
}

.ukfc-main-label {
    color: #b7c2d0;
    font-size: 15px;
    margin-bottom: 8px;
}

.ukfc-main-value {
    font-size: 60px;
    font-weight: 800;
    color: #2fd0b4;
    transition: all .35s ease;
    line-height: 1.05;
}

.ukfc-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ukfc-badge {
    background: rgba(255,255,255,.1);
    color: #e2f8f2;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
}

.ukfc-summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.ukfc-summary-row {
    display: flex;
    justify-content: space-between;
    color: #dce6f4;
    font-size: 15px;
}

.ukfc-summary-row strong {
    color: #fff;
    font-weight: 700;
}

.ukfc-affordability {
    background: rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.ukfc-affordability-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #dce6f4;
}

.ukfc-affordability-top strong {
    color: #2fd0b4;
}

.ukfc-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    overflow: hidden;
    margin-bottom: 8px;
}

.ukfc-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2fd0b4 0%, #76f1d4 100%);
    transition: width .35s ease;
}

.ukfc-affordability-foot {
    font-size: 14px;
    color: #c6d2e2;
}

.ukfc-summary-message {
    margin-top: 10px;
    font-size: 14px;
    color: #dce6f4;
    line-height: 1.5;
}

.ukfc-full-width {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ukfc-section {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.ukfc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.ukfc-section h3, .ukfc-section h4 {
    color: #152238;
    margin-bottom: 10px;
}

.ukfc-section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ukfc-search,
.ukfc-select {
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
}

.ukfc-pagination-btn {
    border: 1px solid #d8e0ea;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.ukfc-table-wrap {
    overflow-x: auto;
}

.ukfc-amortization-table,
.ukfc-comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.ukfc-amortization-table th,
.ukfc-amortization-table td,
.ukfc-comparison-table th,
.ukfc-comparison-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    font-size: 14px;
}

.ukfc-amortization-table th,
.ukfc-comparison-table th {
    background: #f8fafc;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ukfc-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ukfc-chart-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px 20px 24px;
    overflow: hidden;
}

.ukfc-chart-title {
    font-weight: 700;
    color: #152238;
    margin-bottom: 14px;
}

.ukfc-chart-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ukfc-pie-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(#17b394 0 50%, #3b82f6 50% 100%);
    position: relative;
    box-shadow: inset 0 0 0 10px #fff;
}

.ukfc-pie-center {
    width: 78px;
    height: 78px;
    position: absolute;
    inset: 31px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #152238;
    font-size: 13px;
}

.ukfc-pie-center strong {
    font-size: 18px;
    color: #17b394;
}

.ukfc-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #475569;
    font-size: 14px;
}

.ukfc-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ukfc-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ukfc-swatch.principal {
    background: #17b394;
}

.ukfc-swatch.interest {
    background: #3b82f6;
}

.ukfc-rate-badge {
    color: #17b394;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
}

.ukfc-comparison-table tbody tr.is-highlighted {
    background: #ecfdf8;
}

.ukfc-chart-card svg {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    margin-top: 8px;
}

.ukfc-chart-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
    margin-top: 12px;
    gap: 6px;
}

.ukfc-cta-section {
    background: linear-gradient(135deg, #ecfdf8 0%, #f8fbff 100%);
}

.ukfc-cta-section ul {
    margin: 10px 0 16px 20px;
    color: #334155;
}

.ukfc-cta-link {
    display: inline-block;
    background: #17b394;
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 700;
}

.ukfc-seo-section p,
.ukfc-seo-section li {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 10px;
}

.ukfc-pdf-report {
    display: none;
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-family: Arial, sans-serif;
}

.ukfc-pdf-report .ukfc-pdf-header {
    background: #0f2340;
    color: #fff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 18px;
}

.ukfc-pdf-report .ukfc-pdf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.ukfc-pdf-report .ukfc-pdf-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.ukfc-pdf-report .ukfc-pdf-highlight {
    color: #17b394;
    font-weight: 700;
}

.ukfc-pdf-report .ukfc-pdf-footer {
    border-top: 1px solid #e2e8f0;
    margin-top: 18px;
    padding-top: 12px;
    font-size: 12px;
    color: #64748b;
}

.ukfc-disclaimer {
    font-size: 13px;
    line-height: 1.6;
    color: #aebdca;
    margin-top: 8px;
}

@media (max-width: 992px) {
    .ukfc-wrapper {
        grid-template-columns: 1fr;
        width: calc(100% - 20px);
    }

    .ukfc-results-panel {
        position: static;
    }

    .ukfc-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ukfc-wrapper {
        margin: 16px auto 24px;
        width: calc(100% - 16px);
    }

    .ukfc-left, .ukfc-results-panel, .ukfc-section {
        padding: 24px;
    }

    .ukfc-hero h2 {
        font-size: 26px;
    }

    .ukfc-main-value {
        font-size: 32px;
    }

    .ukfc-right {
        order: 2;
    }

    .ukfc-full-width {
        order: 3;
    }
}
