/* Dialog „Anderes Datum“ der Bestellübersicht: Kopf mit dem gewählten Tag, Monatskalender (OtherDateDialog) mit Blättern, Legende und Infozeile.
   Die Datei wird nach app.css eingebunden und baut auf dessen Klassen auf (.kantine-label) und Variablen (Neutral-Paar, input-border). Nur var(--kantine-…) und var(--mud-palette-…), keine Farbwerte. */

/* Dialog: Kopf, Körper und Fußleiste liegen auf der vollen Breite des Dialogs und bringen ihre Abstände selbst mit; dafür hat der Inhaltsbereich von MudBlazor keinen Innenabstand (ContentClass in OtherDateDialog).
   Die Fußleiste (ActionsClass) bekommt eigene Abstände (20 px oben, 24 px seitlich und unten); „Heute“ steht links, „Abbrechen“ und „Anzeigen“ rechts. */
.mud-dialog .mud-dialog-content.kantine-calendar-dialog-content {
    padding: 0;
}

.mud-dialog .mud-dialog-actions.kantine-calendar-dialog-actions {
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 24px 24px;
}

.kantine-calendar-dialog-actions .kantine-calendar-today {
    margin-inline-end: auto;
}

.kantine-calendar-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px 24px 0;
}

.kantine-calendar-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: var(--mud-palette-primary);
    overflow-wrap: anywhere;
}

.kantine-calendar-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 24px 0;
}

/* Monatszeile: runder Button zum Blättern links und rechts, dazwischen der Monat. Die Klickfläche ist 44 px groß. */
.kantine-calendar-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.kantine-calendar-month {
    font-size: 16px;
    font-weight: 700;
}

.kantine-calendar-nav {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 50%;
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-primary);
    cursor: pointer;
}

/* Raster: sieben gleich breite Spalten ab Montag, die Spalten schrumpfen mit dem Dialog (ab 375 px ohne waagerechtes Scrollen).
   Die Leerzellen vor dem ersten Tag (.kantine-calendar-blank) sind leere Rasterfelder und brauchen keine eigene Regel. */
.kantine-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.kantine-calendar-weekday {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

/* Tag: 44 px hoher Button. Die Zustände ergänzen einander in dieser Reihenfolge – Wochenende (gesperrt, gedämpft), Schließtag (durchgestrichen auf Neutral-Hintergrund), heute (2 px Rahmen in der Akzentfarbe) –,
   der gewählte Tag (aria-pressed) gewinnt mit primary und weißem Text; ein Schließtag bleibt dann durchgestrichen. */
.kantine-calendar-day {
    position: relative;
    box-sizing: border-box;
    height: 44px;
    padding: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.kantine-calendar-day--weekend {
    border-color: transparent;
    color: var(--kantine-input-border);
    cursor: default;
}

.kantine-calendar-day--closed {
    background-color: var(--kantine-neutral-bg);
    color: var(--kantine-neutral-text);
    text-decoration: line-through;
}

.kantine-calendar-day--today {
    border: 2px solid var(--mud-palette-secondary);
    font-weight: 700;
}

.kantine-calendar-day[aria-pressed="true"] {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    font-weight: 700;
}

.kantine-calendar-day:focus-visible,
.kantine-calendar-nav:focus-visible {
    outline: 2px solid var(--mud-palette-info);
    outline-offset: 2px;
}

/* Punkt am unteren Rand eines Tages mit Bestellungen; auf dem gewählten Tag weiß */
.kantine-calendar-dot {
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 2px;
    background-color: var(--mud-palette-info);
}

.kantine-calendar-day[aria-pressed="true"] .kantine-calendar-dot {
    background-color: var(--mud-palette-primary-text);
}

/* Mini-Legende: die drei Markierungen im Kleinformat */
.kantine-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.kantine-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kantine-calendar-legend-dot {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background-color: var(--mud-palette-info);
}

.kantine-calendar-legend-closed {
    text-decoration: line-through;
}

.kantine-calendar-legend-today {
    flex: none;
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    border: 2px solid var(--mud-palette-secondary);
    border-radius: 4px;
}

/* Infozeile zum gewählten Tag: „Mo 05.10. · 60 Bestellungen“ auf dem Seitenhintergrund */
.kantine-calendar-info {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background-color: var(--mud-palette-background);
    font-size: 13px;
    color: var(--mud-palette-text-primary);
}
