/* =============================================
   Rent Calculator Pro – Stylesheet
   ============================================= */

.rc-wrapper {
    max-width: 920px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border: 1px solid #e0e4ea;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Header */
.rc-header {
    background: linear-gradient(135deg, #0ea472 0%, #047857 100%);
    padding: 28px 32px;
    text-align: center;
}
.rc-header-icon { font-size: 36px; margin-bottom: 8px; }
.rc-title { margin: 0 0 6px 0 !important; font-size: 24px !important; font-weight: 700 !important; color: #fff !important; }
.rc-subtitle { margin: 0 !important; font-size: 14px; color: rgba(255,255,255,0.78); }

/* Tabs */
.rc-tabs {
    display: flex;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}
.rc-tab {
    flex: 1;
    padding: 14px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}
.rc-tab:hover { color: #0ea472; background: #f0fdf4; }
.rc-tab-active { color: #0ea472 !important; border-bottom-color: #0ea472 !important; background: #fff !important; }

/* Tab content */
.rc-tab-content { display: none; padding: 28px 32px; }
.rc-tab-content-active { display: block; }

/* Grid */
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* Section labels */
.rc-section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: #0ea472; margin: 18px 0 10px;
    padding-bottom: 6px; border-bottom: 2px solid #d1fae5;
}
.rc-section-label:first-child { margin-top: 0; }

/* Fields */
.rc-field { margin-bottom: 12px; }
.rc-label { display: block; font-size: 12px; font-weight: 600; color: #4b5563; margin-bottom: 5px; }

.rc-input-wrap { position: relative; }
.rc-prefix { position: absolute; left: 12px; font-size: 14px; font-weight: 600; color: #6b7280; top: 50%; transform: translateY(-50%); pointer-events: none; }
.rc-input {
    width: 100%; padding: 9px 12px 9px 26px; font-size: 14px; font-weight: 500;
    color: #111827; background: #f9fafb; border: 2px solid #e5e7eb;
    border-radius: 7px; outline: none; box-sizing: border-box; transition: border-color 0.2s;
    -moz-appearance: textfield;
}
.rc-input::-webkit-outer-spin-button, .rc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.rc-input:focus { border-color: #0ea472; background: #fff; box-shadow: 0 0 0 3px rgba(14,164,114,0.1); }
.rc-input-full { padding-left: 12px; }

.rc-select {
    width: 100%; padding: 9px 36px 9px 12px; font-size: 14px; font-weight: 500;
    color: #111827; background: #f9fafb; border: 2px solid #e5e7eb;
    border-radius: 7px; outline: none; cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
    box-sizing: border-box; transition: border-color 0.2s;
}
.rc-select:focus { border-color: #0ea472; }

/* Button */
.rc-calc-btn {
    width: 100%; padding: 13px; font-size: 15px; font-weight: 700;
    color: #fff; background: linear-gradient(135deg, #0ea472, #047857);
    border: none; border-radius: 8px; cursor: pointer; margin-top: 8px; transition: all 0.2s;
}
.rc-calc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14,164,114,0.4); }

/* Results */
.rc-results { display: flex; flex-direction: column; gap: 16px; }

.rc-result-hero {
    background: linear-gradient(135deg, #f0fdf8, #dcfce7);
    border: 2px solid #a7f3d0; border-radius: 10px; padding: 20px; text-align: center;
}
.rc-result-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; color: #6b7280; margin-bottom: 8px; }
.rc-result-price { font-size: 40px; font-weight: 800; color: #0ea472; letter-spacing: -1.5px; line-height: 1; }
.rc-result-sub { font-size: 12px; color: #6b7280; margin-top: 6px; }

/* Metrics */
.rc-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.rc-metric { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 13px 8px; text-align: center; }
.rc-metric-val { font-size: 16px; font-weight: 700; color: #111827; }
.rc-metric-label { font-size: 11px; color: #6b7280; margin-top: 3px; }

/* Range card */
.rc-range-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; }
.rc-range-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #374151; margin-bottom: 12px; }
.rc-range-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.rc-range-row:last-child { border-bottom: none; }
.rc-range-label { color: #4b5563; display: flex; align-items: center; gap: 6px; }
.rc-range-val { font-weight: 700; color: #111827; }
.rc-tag { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.rc-tag-green { background: #dcfce7; color: #16a34a; }
.rc-tag-yellow { background: #fef9c3; color: #ca8a04; }
.rc-tag-red { background: #fee2e2; color: #dc2626; }

/* Income allocation bar */
.rc-afford-bar-wrap { }
.rc-afford-bar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #374151; margin-bottom: 10px; }
.rc-bar-stack { height: 28px; border-radius: 8px; overflow: hidden; display: flex; }
.rc-bar-stack div { height: 100%; transition: width 0.5s ease; }
.rc-bar-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.rc-bar-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #4b5563; }
.rc-bar-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Rent vs Buy verdict */
.rc-verdict {
    display: flex; align-items: center; gap: 12px;
    background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 10px; padding: 18px;
}
.rc-verdict-icon { font-size: 32px; flex-shrink: 0; }
.rc-verdict-text { font-size: 15px; font-weight: 700; color: #111827; }
.rc-verdict-green { background: #f0fdf8 !important; border-color: #a7f3d0 !important; }
.rc-verdict-blue  { background: #eff6ff !important; border-color: #bfdbfe !important; }

/* Compare cards */
.rc-compare-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rc-compare-card { background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 8px; padding: 16px; }
.rc-compare-card.rc-winner { border-color: #0ea472; background: #f0fdf8; }
.rc-compare-title { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px; }
.rc-compare-main { font-size: 24px; font-weight: 800; color: #0ea472; letter-spacing: -0.5px; }
.rc-compare-sub { font-size: 11px; color: #6b7280; margin-bottom: 12px; }
.rc-years-label { font-weight: 700; }
.rc-compare-rows { display: flex; flex-direction: column; gap: 5px; }
.rc-compare-row { display: flex; justify-content: space-between; font-size: 12px; color: #4b5563; padding: 3px 0; border-bottom: 1px solid #f3f4f6; }
.rc-compare-row:last-child { border-bottom: none; }

/* Budget bars */
.rc-donut-wrap { }
.rc-donut-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #374151; margin-bottom: 12px; }
.rc-budget-bars { display: flex; flex-direction: column; gap: 8px; }
.rc-budget-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.rc-budget-bar-label { width: 110px; flex-shrink: 0; color: #4b5563; }
.rc-budget-bar-track { flex: 1; height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.rc-budget-bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s ease; }
.rc-budget-bar-val { width: 56px; text-align: right; font-weight: 600; color: #111827; flex-shrink: 0; }

/* Budget hero state */
.rc-budget-surplus { background: linear-gradient(135deg,#f0fdf8,#dcfce7) !important; border-color: #a7f3d0 !important; }
.rc-budget-surplus .rc-result-price { color: #0ea472 !important; }
.rc-budget-deficit { background: linear-gradient(135deg,#fff1f2,#fee2e2) !important; border-color: #fca5a5 !important; }
.rc-budget-deficit .rc-result-price { color: #dc2626 !important; }

.rc-disclaimer { font-size: 11px; color: #9ca3af; margin: 0 !important; line-height: 1.5; }

/* Responsive */
@media (max-width: 680px) {
    .rc-grid { grid-template-columns: 1fr; }
    .rc-tab-content { padding: 20px 16px; }
    .rc-tab { font-size: 11px; padding: 12px 6px; }
    .rc-compare-cards { grid-template-columns: 1fr; }
    .rc-result-price { font-size: 32px; }
}
