/* ============================================
   Rent Calculator
   ============================================ */

.calc-hero {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #111111 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.calc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.calc-hero .static-badge {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.15);
}

.calc-hero .static-header h1 {
    color: #ffffff;
}

.calc-hero .static-header p {
    color: rgba(255,255,255,0.6);
}

/* ── Layout ── */
.calc-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 40px;
    padding: 64px 0 80px;
    align-items: start;
}

/* ── Form Panel ── */
.calc-form-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    position: sticky;
    top: 88px;
}

.calc-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Solomon Sans', sans-serif;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.calc-section {
    margin-bottom: 24px;
}

.calc-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Toggle group */
.calc-toggle-group {
    display: flex;
    gap: 8px;
}

.calc-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.calc-toggle:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.calc-toggle.active {
    background: var(--text-dark);
    color: white;
    border-color: var(--text-dark);
}

/* Select */
.calc-select-wrapper {
    position: relative;
}

.calc-select-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
}

[dir="rtl"] .calc-select-icon {
    left: auto;
    right: 14px;
}

.calc-select {
    width: 100%;
    padding: 12px 16px 12px 38px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-dark);
    background: white;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

[dir="rtl"] .calc-select {
    padding: 12px 38px 12px 16px;
}

.calc-select:focus {
    border-color: var(--text-dark);
}

/* Stepper */
.calc-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
    min-width: 160px;
}

.stepper-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}

.stepper-btn:hover {
    background: #e5e5e5;
}

.stepper-value {
    padding: 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 40px;
    text-align: center;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    line-height: 44px;
}

.stepper-unit {
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Slider */
.calc-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-dark);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: box-shadow 0.15s ease;
}

.calc-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.slider-current {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    background: var(--bg-light);
    padding: 2px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* Amenities */
.calc-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.amenity-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.amenity-chip input[type="checkbox"] {
    display: none;
}

.amenity-chip:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.amenity-chip.checked {
    background: var(--text-dark);
    color: white;
    border-color: var(--text-dark);
}

.calc-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 15px;
    border-radius: 12px;
    margin-top: 8px;
    gap: 10px;
}

/* ── Results Panel ── */
.calc-results-panel {
    min-height: 480px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

/* Placeholder */
.calc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    flex: 1;
    padding: 40px;
    gap: 16px;
}

.calc-placeholder-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-light);
}

.calc-placeholder h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Solomon Sans', sans-serif;
}

.calc-placeholder p {
    font-size: 14px;
    color: var(--text-light);
    max-width: 300px;
    line-height: 1.6;
}

/* Result content */
.calc-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.result-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Solomon Sans', sans-serif;
}

.result-badge {
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
}

.result-main-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 28px;
    background: var(--text-dark);
    color: white;
    border-radius: 16px;
}

.result-currency {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.7;
}

.result-amount {
    font-size: 52px;
    font-weight: 700;
    font-family: 'Solomon Sans', sans-serif;
    letter-spacing: -0.03em;
    line-height: 1;
    transition: all 0.3s ease;
}

.result-period {
    font-size: 16px;
    opacity: 0.6;
    align-self: flex-end;
    padding-bottom: 6px;
}

.result-range {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-range strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* Breakdown */
.result-breakdown h3,
.result-tips h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.breakdown-row:last-child {
    border-bottom: none;
    background: var(--bg-light);
    font-weight: 700;
    color: var(--text-dark);
}

.breakdown-row .bd-label {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-row:last-child .bd-label {
    color: var(--text-dark);
    font-weight: 700;
}

.breakdown-row .bd-amount {
    font-weight: 600;
    color: var(--text-dark);
}

/* Tips */
.result-tips {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.result-tips h3 {
    color: var(--text-dark);
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tips-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tip-item {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.tip-item::before {
    content: '→';
    color: var(--text-dark);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.result-cta {
    align-self: flex-start;
    margin-top: 8px;
}

/* ── Benchmark Table ── */
.benchmark-section {
    padding: 0 0 80px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 60px;
}

.benchmark-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Solomon Sans', sans-serif;
    margin-bottom: 8px;
}

.benchmark-subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 28px;
}

.benchmark-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.benchmark-table thead tr {
    background: var(--text-dark);
    color: white;
}

.benchmark-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

[dir="rtl"] .benchmark-table th {
    text-align: right;
}

.benchmark-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.benchmark-table tbody tr:last-child {
    border-bottom: none;
}

.benchmark-table tbody tr:hover {
    background: var(--bg-light);
}

.benchmark-table td {
    padding: 13px 18px;
    color: var(--text-light);
    white-space: nowrap;
}

.benchmark-table td:first-child {
    color: var(--text-dark);
    font-weight: 600;
}

.benchmark-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }

    .calc-form-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .calc-layout {
        padding: 40px 0 60px;
        gap: 24px;
    }

    .calc-form-panel,
    .calc-results-panel {
        padding: 24px;
        border-radius: 16px;
    }

    .result-amount {
        font-size: 40px;
    }

    .calc-toggle-group {
        flex-wrap: wrap;
    }

    .calc-toggle {
        font-size: 12px;
        padding: 9px 6px;
    }
}
