/* ============================================================
   SpeakWithMe — Crystal Light Theme
   ============================================================ */

:root {
    --swm-primary:       #0284C7;
    --swm-primary-dark:  #0369A1;
    --swm-primary-light: #BAE6FD;
    --swm-primary-pale:  #F0F9FF;
    --swm-green:         #059669;
    --swm-green-light:   #D1FAE5;
    --swm-amber:         #D97706;
    --swm-amber-light:   #FEF3C7;
    --swm-red:           #DC2626;
    --swm-red-light:     #FEE2E2;

    --crystal-border:    rgba(2, 132, 199, 0.12);
    --crystal-shadow:    0 4px 24px rgba(2, 132, 199, 0.08);

    --text-primary:   #0F172A;
    --text-secondary: #475569;
    --text-muted:     #94A3B8;

    --radius:    14px;
    --radius-sm: 8px;
}

/* ---- База ---- */
*, *::before, *::after {
    box-sizing: border-box;
    animation-duration:        0s !important;
    animation-delay:           0s !important;
    animation-iteration-count: 1 !important;
}

html, body {
    margin: 0; padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #C2DFF4 100%) fixed;
    color: var(--text-primary);
    min-height: 100vh;
}

.cursor-pointer { cursor: pointer; }

/* ============================================================
   MudBlazor overrides
   ============================================================ */

.mud-paper {
    border-radius: var(--radius) !important;
}

.mud-card {
    border-radius: var(--radius) !important;
    box-shadow: var(--crystal-shadow) !important;
    border: 1px solid var(--crystal-border) !important;
}

.mud-table-head .mud-table-cell {
    background: var(--swm-primary-pale) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--swm-primary) !important;
}

.mud-input-outlined {
    background-color: #ffffff !important;
    border-radius: var(--radius-sm) !important;
}
.mud-input-outlined .mud-input-outlined-border {
    border-color: var(--crystal-border) !important;
    border-radius: var(--radius-sm) !important;
}

.mud-button-filled { border-radius: 10px !important; font-weight: 600 !important; }

/* ---- Диалог ---- */
.mud-dialog {
    background: linear-gradient(135deg, #ffffff 0%, #DCEEFA 100%) !important;
}
.mud-dialog .mud-dialog-title {
    background: rgba(255, 255, 255, 0.70);
    color: var(--text-primary);
    padding: 14px 20px;
    border-bottom: 1px solid var(--crystal-border);
}
.mud-dialog .mud-dialog-title .mud-typography {
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 15px;
}

/* ---- MudTabs ---- */
.mud-tabs .mud-tabs-tabbar {
    background: linear-gradient(to bottom, #e8f4fd 0%, #d0e9f8 100%);
    border-bottom: 1px solid rgba(2, 132, 199, 0.20);
    border-radius: 10px 10px 0 0;
}
.mud-tab-slider { display: none; }
.mud-tabs .mud-tab.mud-tab-active {
    background: #ffffff !important;
    color: var(--swm-primary) !important;
    font-weight: 600 !important;
}

/* ============================================================
   Статус чипове
   ============================================================ */
.status-chip {
    display: inline-flex; align-items: center;
    font-size: 11px; font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.status-active   { background: var(--swm-green-light); color: var(--swm-green); }
.status-pending  { background: var(--swm-amber-light); color: var(--swm-amber); }
.status-inactive { background: #F1F5F9; color: var(--text-muted); }

/* ============================================================
   Портрети на герои
   ============================================================ */
.portrait {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #2B3A57;
    flex-shrink: 0;
}
.portrait-placeholder {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #CBD5E1;
    color: #475569;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}

.portrait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
    gap: 10px;
}
.portrait-card {
    background: #fff;
    border: 1px solid var(--crystal-border);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: default;
}
.portrait-card.pickable { cursor: pointer; }
.portrait-card.pickable:hover { border-color: var(--swm-primary); background: var(--swm-primary-pale); }
.portrait-card.selected { border-color: var(--swm-primary); box-shadow: 0 0 0 2px var(--swm-primary-light); }
.portrait-card img {
    width: 100%; aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    background: #2B3A57;
    display: block;
    margin-bottom: 6px;
}

/* ============================================================
   Blazor error boundary
   ============================================================ */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}
.blazor-error-boundary::after { content: "Възникна грешка."; }
