/* ── Global resets ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: #F4F6F8;
}

/* ── Blazor error UI ──────────────────────────────────────── */
#blazor-error-ui {
    background: #FEF2F2;
    border-top: 2px solid #C62828;
    bottom: 0;
    color: #1C1C1E;
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

/* ── Hero gradient ────────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, #0D1B2A 0%, #1A3C5E 60%, #1e4a72 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232,101,10,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Stat cards ───────────────────────────────────────────── */
.stat-card {
    border-left: 4px solid var(--mud-palette-secondary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,60,94,0.12) !important;
}

/* ── Match score ring label ───────────────────────────────── */
.score-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1A3C5E;
}

/* ── City swap badge ──────────────────────────────────────── */
.city-swap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6B7280;
}

.city-swap .arrow {
    color: #E8650A;
    font-size: 1rem;
}

/* ── Listing card hover ───────────────────────────────────── */
.listing-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(26,60,94,0.15) !important;
}

/* ── Listing card gradient header ────────────────────────── */
.listing-header {
    height: 140px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

/* ── Avatar initials ─────────────────────────────────────── */
.avatar-initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

/* ── Visibility toggle ───────────────────────────────────── */
.visibility-banner {
    border-radius: 10px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Feature icon circle ─────────────────────────────────── */
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ── Loading skeleton pulse ──────────────────────────────── */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.skeleton {
    background: #E5E7EB;
    border-radius: 6px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* ── Scrollbar styling ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ── Admin table header ──────────────────────────────────── */
.relocq-table thead tr th {
    background: #F8FAFC !important;
    border-bottom: 1px solid #E5E7EB !important;
}

/* ══ Dark mode ══════════════════════════════════════════════════
   Custom properties override inline-styled elements in dark mode.
   MudBlazor components adapt automatically when IsDarkMode=true.
══════════════════════════════════════════════════════════════════ */

:root {
    --rq-surface:      #ffffff;
    --rq-elevated:     #F8FAFC;
    --rq-border:       #E5E7EB;
    --rq-text-1:       #0D1B2A;
    --rq-text-2:       #6B7280;
    --rq-text-3:       #9CA3AF;
    --rq-chip-info-bg: #EFF6FF;
    --rq-chip-info-tx: #1D4ED8;
    --rq-chip-warn-bg: #FFF7ED;
    --rq-chip-warn-tx: #C2410C;
    --rq-chip-grn-bg:  #D1FAE5;
    --rq-chip-grn-tx:  #065F46;
    --rq-intro-bg:     #EFF6FF;
    --rq-intro-border: #1D4ED8;
    --rq-intro-text:   #1E3A5F;
}

html.dark {
    --rq-surface:      #1E3347;
    --rq-elevated:     #1A2940;
    --rq-border:       rgba(255,255,255,0.08);
    --rq-text-1:       #F1F5F9;
    --rq-text-2:       #94A3B8;
    --rq-text-3:       #64748B;
    --rq-chip-info-bg: rgba(29,78,216,0.25);
    --rq-chip-info-tx: #93C5FD;
    --rq-chip-warn-bg: rgba(194,65,12,0.25);
    --rq-chip-warn-tx: #FCA678;
    --rq-chip-grn-bg:  rgba(5,150,105,0.25);
    --rq-chip-grn-tx:  #6EE7B7;
    --rq-intro-bg:     rgba(29,78,216,0.15);
    --rq-intro-border: #4A90D9;
    --rq-intro-text:   #93C5FD;
}

/* MudPaper cards — override hardcoded #fff backgrounds */
html.dark .mud-paper {
    background: var(--rq-surface) !important;
    border-color: var(--rq-border) !important;
}

/* Table headers */
html.dark .relocq-table thead tr th {
    background: var(--rq-elevated) !important;
    border-bottom-color: var(--rq-border) !important;
}

/* Scrollbar */
html.dark ::-webkit-scrollbar-thumb { background: #2E4A63; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #4A90D9; }

/* Smooth transitions */
.mud-paper, .mud-main-content {
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
