﻿/* ============================================================
   dialogs.css — Shared dialog design system (dlg-)
   Loaded once in App.razor. Every dialog uses these classes for
   its common chrome so they stay visually consistent.

   Dialog-SPECIFIC styles do NOT belong here — put them in that
   dialog's scoped <Name>.razor.css instead.

   To diverge a single dialog's shared element, add a modifier to
   its root (Class="dlg-dialog dlg-dialog--player") and override under
   `.dlg-dialog--player ...` in that dialog's scoped css.
   ============================================================ */

/* ── Dialog wrapper (rendered by MudBlazor → must be global) ── */
.dlg-dialog .mud-dialog {
    border-radius: 16px !important;
    overflow: hidden;
    min-width: 480px;
}

/* ── Title ── */
.dlg-dialog-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.dlg-dialog-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--mud-palette-primary);
    flex-shrink: 0;
}

.dlg-dialog-title-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.dlg-dialog-title-sub {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    margin-top: 1px;
}

/* ── Body ── */
.dlg-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 4px 0 8px;
}

/* ── Section grouping ── */
.dlg-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dlg-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.14);
}

.dlg-section-icon {
    font-size: 16px !important;
    color: var(--mud-palette-primary);
}

.dlg-section-title {
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

/* ── Field layout ── */
.dlg-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dlg-field {
    width: 100%;
}

/* ── Switch / toggle row ── */
.dlg-switch-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

/* ── Hints / links ── */
.dlg-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
    padding: 0 2px;
}

.dlg-link {
    color: var(--mud-palette-primary);
    font-weight: 600;
    cursor: pointer;
}

    .dlg-link:hover {
        text-decoration: underline;
    }

/* ── Validation message ── */
.dlg-validation-msg {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--mud-palette-error);
    background: rgba(211, 47, 47, 0.08);
    border: 1px solid rgba(211, 47, 47, 0.25);
    border-radius: 7px;
    padding: 7px 11px;
}

/* ── Required legend ── */
.dlg-required-legend {
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
    padding-top: 4px;
    border-top: 1px dashed rgba(128, 128, 128, 0.18);
}

.dlg-required-star {
    color: var(--mud-palette-error);
    font-weight: 700;
}

/* ── Actions ── */
.dlg-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 0;
    width: 100%;
}

.dlg-btn-cancel {
    font-size: 13px !important;
}

.dlg-btn-save {
    font-size: 13px !important;
    border-radius: 10px !important;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .dlg-date-row {
        grid-template-columns: 1fr;
    }

    .dlg-dialog .mud-dialog {
        min-width: unset !important;
    }
}

/* ── Tall dialogs scroll their body (carried over from the old
      AddEditEventDialog.css). Scoped to dlg- dialogs only. ── */
.dlg-dialog .mud-dialog {
    max-height: 92vh !important;
}

    .dlg-dialog .mud-dialog .mud-dialog-content {
        overflow-y: auto !important;
        max-height: calc(92vh - 140px) !important;
        padding-bottom: 12px !important;
    }
