/* ════════════════════════════════════════════════════════════
 * ui-datetime.css — Biosis RCL component stilleri
 * Bölümler: UiCalendar, UiDatePicker, UiTimePicker
 * (ui-components.css monolitinden bölündü — 2026-06-02)
 * ════════════════════════════════════════════════════════════ */

/*
 * UiCalendar — shadcn/ui-style month-grid date picker.
 *
 * Geometry: 7-column CSS grid with 36×36 day buttons. The header
 * row (◀ Month YYYY ▶) sits above the weekday strip; weekdays sit
 * above the day grid. Rounded-corner buttons with accent-tinted
 * hover and a filled accent bg for the currently-selected day.
 */

.ui-cal {
    width: 280px;
    padding: 12px;
    background-color: var(--va-card);
    border: 1px solid var(--va-border);
    border-radius: 12px;
    box-shadow: var(--va-shadow);
    color: var(--va-text);
    font-family: var(--va-font-body);
    user-select: none;
}

/* ── Header (← Month YYYY →) ─────────────────────────────────── */
.ui-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 8px;
}

.ui-cal__nav {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: 0;
    color: var(--va-text-dim);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms ease, color 120ms ease;
}
.ui-cal__nav:hover {
    background-color: var(--va-elevated);
    color: var(--va-text);
}
.ui-cal__nav svg { width: 14px; height: 14px; }

.ui-cal__title {
    flex: 1 1 0;
    height: 28px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--va-text);
    font-family: var(--va-font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0 8px;
    transition: background-color 120ms ease;
}
.ui-cal__title:hover { background-color: var(--va-elevated); }

/* ── Weekday strip ───────────────────────────────────────────── */
.ui-cal__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
    padding: 0 2px;
}
.ui-cal__weekdays span {
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--va-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Day grid ────────────────────────────────────────────────── */
.ui-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.ui-cal__day {
    height: 36px;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--va-text);
    font-family: var(--va-font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
    border: 1px solid transparent;
}
.ui-cal__day:hover {
    background-color: color-mix(in oklab, var(--va-accent) 14%, transparent);
}

/* Days that bleed in from the previous / next month — dimmer so
   the focal month reads clearly. */
.ui-cal__day.is-outside { color: var(--va-text-muted); }

/* Today indicator — outline ring without filled bg, so it
   coexists visually with `is-selected` (filled bg) without
   doubling up. */
.ui-cal__day.is-today:not(.is-selected) {
    border-color: var(--va-border-strong);
    color: var(--va-text);
}

/* The currently-selected day gets the accent fill that shadcn uses
   for `data-selected`. Foreground is the theme's button-on-accent
   colour (`var(--va-on-accent)` matches our primary button). */
.ui-cal__day.is-selected {
    background-color: var(--va-accent);
    color: var(--va-on-accent);
    font-weight: 600;
}
.ui-cal__day.is-selected:hover {
    background-color: var(--va-accent);
    filter: brightness(1.05);
}

.ui-cal__day.is-disabled,
.ui-cal__day:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ui-cal__day:disabled:hover { background: transparent; }

/* ── Year-picker grid ────────────────────────────────────────── */
.ui-cal__years {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px 0;
}
.ui-cal__year {
    height: 40px;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--va-text);
    font-family: var(--va-font-mono);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 120ms ease;
}
.ui-cal__year:hover { background-color: var(--va-elevated); }
.ui-cal__year.is-selected {
    background-color: var(--va-accent);
    color: var(--va-on-accent);
    font-weight: 600;
}

/* === Ui/DateTime/UiDatePicker.razor.css === */
/*
 * UiDatePicker — input-style trigger + calendar popover.
 *
 * Trigger geometry mirrors UiInput's md size (h-9, 8px radius) so
 * date pickers line up with text fields in the same form row. The
 * popover renders the calendar plus an optional hour:minute strip
 * with confirm / cancel actions.
 */

.ui-dp {
    position: relative;
    display: inline-flex;
    width: 100%;
}

/* ── Trigger ─────────────────────────────────────────────────── */
.ui-dp__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 36px;
    padding: 0 0.625rem 0 0.75rem;
    background-color: var(--va-elevated);
    border: 1px solid var(--va-border);
    border-radius: 8px;
    color: var(--va-text);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    text-align: start;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.ui-dp__trigger:hover { border-color: var(--va-border-light); }
.ui-dp__trigger:focus-visible,
.ui-dp.is-open .ui-dp__trigger {
    outline: none;
    border-color: var(--va-accent);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--va-accent) 22%, transparent);
}
.ui-dp.is-disabled .ui-dp__trigger,
.ui-dp__trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ui-dp__icon {
    width: 14px;
    height: 14px;
    color: var(--va-text-dim);
    flex-shrink: 0;
}

.ui-dp__value {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ui-dp__value--placeholder { color: var(--va-text-muted); }

.ui-dp__clear {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: transparent;
    border: 0;
    color: var(--va-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 120ms ease, color 120ms ease;
}
.ui-dp__clear:hover { background-color: var(--va-elevated); color: var(--va-text); }
.ui-dp__clear svg { width: 12px; height: 12px; }

/* ── Popover ─────────────────────────────────────────────────── */
.ui-dp__backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: transparent;
}
.ui-dp__popover {
    position: absolute;
    z-index: 81;
    inset-block-start: calc(100% + 6px);
    inset-inline-start: 0;
    background-color: var(--va-card);
    border: 1px solid var(--va-border);
    border-radius: 12px;
    box-shadow: var(--va-shadow-lg);
    animation: ui-dp-in 140ms cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}
@keyframes ui-dp-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0)    scale(1);     }
}
@media (prefers-reduced-motion: reduce) {
    .ui-dp__popover { animation: none; }
}

/*
 * The embedded calendar is already styled by UiCalendar. Drop its
 * border + shadow when nested inside the popover so we don't
 * double-frame it.
 */
.ui-dp__popover .ui-cal {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

/* ── Time strip (IncludeTime=true) ──────────────────────────── */
.ui-dp__time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-block-start: 1px solid var(--va-border);
}
.ui-dp__time-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--va-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ui-dp__time-fields {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ui-dp__time-input {
    width: 48px;
    height: 30px;
    padding: 0 6px;
    background-color: var(--va-elevated);
    border: 1px solid var(--va-border);
    border-radius: 6px;
    color: var(--va-text);
    font-family: var(--va-font-mono);
    font-size: 0.8125rem;
    text-align: center;
    outline: none;
    transition: border-color 120ms ease;
}
.ui-dp__time-input:focus { border-color: var(--va-accent); }
.ui-dp__time-sep {
    font-family: var(--va-font-mono);
    color: var(--va-text-muted);
}

/* ── Action row ──────────────────────────────────────────────── */
.ui-dp__actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px 12px 10px;
    border-block-start: 1px solid var(--va-border);
}
.ui-dp__btn {
    height: 30px;
    padding: 0 10px;
    border-radius: 7px;
    border: 0;
    background-color: var(--va-accent);
    color: var(--va-on-accent);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 120ms ease, opacity 120ms ease;
}
.ui-dp__btn:hover { background-color: var(--va-accent-hover); }
.ui-dp__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ui-dp__btn--ghost {
    background-color: transparent;
    color: var(--va-text-dim);
}
.ui-dp__btn--ghost:hover {
    background-color: var(--va-elevated);
    color: var(--va-text);
}

/* === Ui/DateTime/UiTimePicker.razor.css === */
/*
 * UiTimePicker — bordered shell shaped like UiInput's md size (h-9 /
 * 36px / 8px radius) so it sits on the same baseline as inline form
 * fields. Clock icon on the leading edge, two compact text fields
 * for hour + minute separated by a colon, optional × clear button
 * on the trailing edge.
 */

.ui-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    height: 36px;
    padding: 0 0.5rem 0 0.625rem;
    background-color: var(--va-elevated);
    border: 1px solid var(--va-border);
    border-radius: 8px;
    color: var(--va-text);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.ui-time:focus-within {
    border-color: var(--va-accent);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--va-accent) 22%, transparent);
}

.ui-time.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.ui-time.is-disabled .ui-time__field { cursor: not-allowed; }

.ui-time.is-invalid {
    border-color: var(--va-danger);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--va-danger) 18%, transparent);
}

.ui-time__icon {
    width: 14px;
    height: 14px;
    color: var(--va-text-dim);
    flex-shrink: 0;
}

/* Hour + minute text inputs share the same minimal styling — no own
   border (the wrapper provides it), monospace so 09 / 21 read as
   equal-width pairs, centre-aligned for the "HH : MM" feel. */
.ui-time__field {
    width: 26px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--va-text);
    font-family: var(--va-font-mono);
    font-size: 0.875rem;
    text-align: center;
    outline: none;
    /* Suppress the WebKit / Firefox spinner the type=text fallback
       inherits when the user agent guesses numeric. */
    -moz-appearance: textfield;
    appearance: textfield;
}
.ui-time__field::-webkit-outer-spin-button,
.ui-time__field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ui-time__field::placeholder {
    color: var(--va-text-muted);
    font-family: var(--va-font-mono);
}

.ui-time__sep {
    color: var(--va-text-dim);
    font-family: var(--va-font-mono);
    user-select: none;
}

.ui-time__clear {
    width: 22px;
    height: 22px;
    margin-inline-start: 4px;
    border-radius: 999px;
    background: transparent;
    border: 0;
    color: var(--va-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 120ms ease, color 120ms ease;
}
.ui-time__clear:hover {
    background-color: color-mix(in oklab, var(--va-danger) 14%, transparent);
    color: var(--va-danger);
}
.ui-time__clear svg { width: 12px; height: 12px; }

/* === Ui/Dialogs/UiConfirmDialog.razor.css === */