/* Mortgage Calculator — style.css v1.0 */

.mcc-wrap {
    max-width: 580px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

.mcc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.mcc-icon { font-size: 32px; line-height: 1; }
.mcc-title {
    font-size: 22px !important;
    font-weight: 600 !important;
    margin: 0 0 3px !important;
    padding: 0 !important;
    border: none !important;
    color: #1a1a1a !important;
}
.mcc-sub { font-size: 13px; color: #666; margin: 0; }

.mcc-section-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    margin-top: 16px;
}

/* Grid */
.mcc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 4px;
}
@media (max-width: 480px) { .mcc-grid { grid-template-columns: 1fr; } }

.mcc-lbl {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

/* Inputs */
.mcc-input-w { position: relative; }
.mcc-input-w input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 44px 9px 22px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    transition: border-color .15s;
    -moz-appearance: textfield;
}
.mcc-input-w input::-webkit-inner-spin-button,
.mcc-input-w input::-webkit-outer-spin-button { -webkit-appearance: none; }
.mcc-input-w input:focus {
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.mcc-prefix {
    position: absolute;
    left: 9px; top: 50%;
    transform: translateY(-50%);
    font-size: 13px; color: #999;
    pointer-events: none;
}
.mcc-suffix {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    font-size: 12px; color: #999;
    pointer-events: none;
}

/* Range slider */
.mcc-range { margin-top: 5px; }
.mcc-range input[type=range] { width: 100%; }
.mcc-range-vals {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #bbb;
    margin-top: 2px;
}

/* Term toggle */
.mcc-toggle {
    display: flex;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    overflow: hidden;
    height: 38px;
}
.mcc-toggle button {
    flex: 1;
    padding: 0 8px;
    font-size: 13px;
    border: none;
    border-right: 1px solid #d0d0d0;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: background .13s, color .13s;
}
.mcc-toggle button:last-child { border-right: none; }
.mcc-toggle button:hover:not(.act) { background: #f5f5f5; }
.mcc-toggle button.act {
    background: #e8f0fe;
    color: #1a56db;
    font-weight: 600;
}

/* Result card */
.mcc-result-card {
    background: #f0f6ff;
    border: 1px solid #c2d8f8;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 20px;
    margin-bottom: 16px;
    animation: mcc-in .25s ease;
}
@keyframes mcc-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

.mcc-res-main {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.mcc-metric { flex: 1; text-align: center; }
.mcc-metric-sep { width: 1px; height: 44px; background: #c2d8f8; }
.mcc-metric-val { font-size: 20px; font-weight: 700; color: #0d2e6e; }
.mcc-metric-lbl { font-size: 11px; color: #5a7ab5; margin-top: 3px; }

/* Breakdown bars */
.mcc-breakdown { border-top: 1px solid #d0e4f8; padding-top: 12px; }
.mcc-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}
.mcc-bar-row:last-child { margin-bottom: 0; }
.mcc-bar-label { font-size: 12px; color: #3a5a9a; width: 100px; flex-shrink: 0; }
.mcc-bar-track {
    flex: 1;
    height: 7px;
    background: #d0e4f8;
    border-radius: 4px;
    overflow: hidden;
}
.mcc-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s ease;
}
.mcc-bar-amt { font-size: 12px; color: #0d2e6e; width: 100px; text-align: right; flex-shrink: 0; }

/* Amortization */
.mcc-amort { margin-bottom: 14px; }
.mcc-amort-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.mcc-amort-title { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.mcc-amort-btns { display: flex; gap: 6px; }
.mcc-av-btn {
    font-size: 12px;
    padding: 5px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: background .13s;
}
.mcc-av-btn.act {
    background: #e8f0fe;
    color: #1a56db;
    border-color: #a8c4f0;
    font-weight: 600;
}

table.mcc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.mcc-table th {
    padding: 8px 10px;
    text-align: right;
    color: #888;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
}
table.mcc-table th:first-child { text-align: left; }
table.mcc-table td {
    padding: 7px 10px;
    text-align: right;
    color: #1a1a1a;
    border-bottom: 1px solid #f0f0f0;
}
table.mcc-table td:first-child { text-align: left; color: #555; font-weight: 500; }
table.mcc-table tr:hover td { background: #f7f9ff; }
table.mcc-table tr:last-child td { border-bottom: none; }

.mcc-more-btn {
    width: 100%;
    margin-top: 8px;
    padding: 9px;
    font-size: 13px;
    color: #555;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .13s;
}
.mcc-more-btn:hover { background: #f5f5f5; }

.mcc-reset {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px;
    font-size: 13px;
    color: #999;
    background: none;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: background .13s;
}
.mcc-reset:hover { background: #f5f5f5; color: #333; }
