/* ── Mortgage Calculator Plugin ─────────────────────────────────── */

.mc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    max-width: 560px;
    margin: 0 auto 2rem;
    box-sizing: border-box;
}

.mc-wrap *,
.mc-wrap *::before,
.mc-wrap *::after {
    box-sizing: inherit;
}

/* ── Header ─────────────────────────────────────────────────────── */
.mc-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.mc-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
}

.mc-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
}

.mc-subtitle {
    font-size: 13px;
    margin: 0 !important;
    opacity: 0.65;
}

/* ── Tabs ────────────────────────────────────────────────────────── */
.mc-tabs {
    display: flex;
    border-bottom: 1px solid;
    margin-bottom: 1rem;
}

.mc-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 18px 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    letter-spacing: 0.02em;
    font-family: inherit;
}

/* ── Grid ────────────────────────────────────────────────────────── */
.mc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    .mc-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Field ───────────────────────────────────────────────────────── */
.mc-field {
    border-radius: 8px;
    padding: 10px 13px;
    border: 1px solid;
    transition: border-color 0.15s;
}

.mc-field:focus-within {
    outline: 2px solid #378ADD;
    outline-offset: 1px;
}

.mc-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
    opacity: 0.55;
}

.mc-input-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mc-prefix,
.mc-suffix {
    font-size: 13px;
    opacity: 0.45;
    flex-shrink: 0;
}

.mc-input {
    background: none !important;
    border: none !important;
    outline: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

.mc-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: 5px;
    padding: 2px 8px;
    margin-top: 6px;
}

/* ── Select ──────────────────────────────────────────────────────── */
.mc-select-wrap {
    position: relative;
}

.mc-select {
    background: none !important;
    border: none !important;
    outline: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    width: 100% !important;
    padding: 0 24px 0 0 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

.mc-chevron {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 18px;
    opacity: 0.4;
    line-height: 1;
}

/* ── Result box ──────────────────────────────────────────────────── */
.mc-result {
    border-radius: 8px;
    padding: 12px 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid;
}

.mc-result-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.mc-result-amount {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.mc-result-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.mc-result-per {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.55;
}

/* ── Summary stats ───────────────────────────────────────────────── */
.mc-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

@media (max-width: 400px) {
    .mc-summary { grid-template-columns: 1fr; }
}

.mc-stat {
    border-radius: 8px;
    padding: 10px 12px;
}

.mc-stat-label {
    font-size: 11px;
    margin-bottom: 3px;
    opacity: 0.55;
}

.mc-stat-value {
    font-size: 14px;
    font-weight: 600;
}

/* ── Button ──────────────────────────────────────────────────────── */
.mc-btn {
    width: 100%;
    padding: 11px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid;
    font-family: inherit;
    transition: opacity 0.15s, transform 0.1s;
    text-transform: uppercase;
}

.mc-btn:hover { opacity: 0.8; }
.mc-btn:active { transform: scale(0.99); }

/* ══════════════════════════════════════════════════════════════════
   LIGHT THEME (default)
══════════════════════════════════════════════════════════════════ */
.mc-theme-light {
    color: #1a1a1a;
}

.mc-theme-light .mc-title { color: #1a1a1a; }
.mc-theme-light .mc-subtitle { color: #555; }

.mc-theme-light .mc-tabs {
    border-color: #e0e0e0;
}

.mc-theme-light .mc-tab {
    color: #888;
}

.mc-theme-light .mc-tab--active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.mc-theme-light .mc-tab:hover:not(.mc-tab--active) {
    color: #1a1a1a;
}

.mc-theme-light .mc-field {
    background: #ffffff;
    border-color: #e4e4e4;
}

.mc-theme-light .mc-input,
.mc-theme-light .mc-select {
    color: #1a1a1a !important;
}

.mc-theme-light .mc-badge {
    background: #eef5fd;
    color: #185FA5;
}

.mc-theme-light .mc-result {
    background: #f7f7f7;
    border-color: #e4e4e4;
}

.mc-theme-light .mc-result-label { color: #555; }
.mc-theme-light .mc-result-value { color: #1a1a1a; }

.mc-theme-light .mc-stat {
    background: #f7f7f7;
}

.mc-theme-light .mc-stat-label { color: #666; }
.mc-theme-light .mc-stat-value { color: #1a1a1a; }

.mc-theme-light .mc-btn {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════
   DARK THEME
══════════════════════════════════════════════════════════════════ */
.mc-theme-dark {
    color: #e8e0d0;
    background: #0d0d0d;
    border-radius: 14px;
    padding: 28px 24px;
}

.mc-theme-dark .mc-title { color: #e8e0d0; }
.mc-theme-dark .mc-subtitle { color: #888; }

.mc-theme-dark .mc-tabs {
    border-color: #2a2a2a;
}

.mc-theme-dark .mc-tab {
    color: #666;
}

.mc-theme-dark .mc-tab--active {
    color: #c9a84c;
    border-bottom-color: #c9a84c;
}

.mc-theme-dark .mc-tab:hover:not(.mc-tab--active) {
    color: #aaa;
}

.mc-theme-dark .mc-field {
    background: #161616;
    border-color: #2a2a2a;
}

.mc-theme-dark .mc-input,
.mc-theme-dark .mc-select {
    color: #e8e0d0 !important;
}

.mc-theme-dark .mc-badge {
    background: #c9a84c18;
    color: #c9a84c;
}

.mc-theme-dark .mc-result {
    background: #161616;
    border-color: #c9a84c55;
}

.mc-theme-dark .mc-result-label { color: #c9a84c; }
.mc-theme-dark .mc-result-value { color: #c9a84c; }

.mc-theme-dark .mc-stat {
    background: #161616;
    border: 1px solid #2a2a2a;
}

.mc-theme-dark .mc-stat-label { color: #888; }
.mc-theme-dark .mc-stat-value { color: #e8e0d0; }

.mc-theme-dark .mc-btn {
    background: #161616;
    border-color: #c9a84c55;
    color: #c9a84c;
}

.mc-theme-dark .mc-btn:hover {
    background: #c9a84c12;
    border-color: #c9a84c;
}

.mc-theme-dark .mc-select option {
    background: #1a1a1a;
    color: #e8e0d0;
}
