/* ============================================================================
   BOTTOM BAR - AI prompt + primary action button + manual task input
   ============================================================================ */
.bottombar {
    display: grid;
    grid-template-columns: 1fr auto auto 1fr;
    gap: 16px;
    align-items: center;
}

.prompt-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}

.label-card {
    padding: 8px 14px;
}

.label {
    font-size: 11px;
    color: var(--chronos-fg-muted);
    margin-bottom: 2px;
}

.primary-fab {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    background: var(--chronos-violet);
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-fab:hover { background: var(--chronos-lavender); }
.primary-fab:disabled { opacity: 0.6; cursor: not-allowed; }

.status-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: var(--chronos-day-selected);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    /* Above every modal/overlay (modals 200, profile 1000, inventory 1100) so a status
       warning shown from inside a modal - e.g. a rejected progress note - stays visible. */
    z-index: 1300;
}

/* ============================================================================
   FILTER MODAL - semitransparent backdrop + centered card. Same look on web
   as in the Avalonia surface (modal-card with shadow, chip / primary buttons).
   ============================================================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-card {
    background: var(--chronos-card-bg);
    border: 1px solid var(--chronos-outline);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    padding: 24px;
    min-width: 380px;
    max-width: 520px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* v0.4.68: phones - the fixed min-width used to force the card wider than the
   viewport budget (375 - 2x24 backdrop padding = 327px) and clip the right edge. */
@media (max-width: 480px) {
    .modal-card { min-width: 0; width: 94%; padding: 18px; }
}

/* ============================================================================
   v0.4.68: shared confirm dialog (ConfirmDialog.razor). Standard modal chrome +
   a raised z-index so confirms opened from INSIDE the profile (z 1000) or
   inventory/customization (z 1100) overlays stack above them. Status warnings
   stay on top at 1300.
   ============================================================================ */
.confirm-backdrop { z-index: 1200; }
.confirm-card {
    min-width: 0;
    max-width: 400px;
    text-align: center;
    align-items: center;
    gap: 10px;
}
.confirm-icon {
    font-size: 38px;
    line-height: 1;
    margin-top: 2px;
}
.confirm-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}
.confirm-body {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--chronos-fg-muted);
    max-width: 320px;
}
/* ---- v0.4.68: segmented yes/no pill ----------------------------------------
   The two loose capsule buttons fused into ONE control (founder ask). The pill
   is a flex row with a 1px gap; the container's background shows through the
   gap as the divider. Hover is a tug-of-war: the hovered segment grows while
   the other yields and dims. The confirm segment carries a gradient (violet,
   or red via .is-danger), a one-shot sheen sweep, and arms a coloured halo on
   the whole pill via :has() (children's own shadows would be clipped by the
   overflow:hidden radius). Reduced-motion strips the movement, keeps colours. */
.confirm-split {
    display: flex;
    width: 100%;
    max-width: 320px;
    height: 46px;
    margin-top: 4px;
    gap: 1px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--chronos-outline);
    background: var(--chronos-outline); /* the 1px gap = the divider line */
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.confirm-split > * { min-width: 0; }
.confirm-split-no,
.confirm-split-yes {
    flex: 1 1 0;
    border: none;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: flex-grow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.18s ease, color 0.18s ease,
                filter 0.18s ease, opacity 0.18s ease;
}
.confirm-split-no {
    background: var(--chronos-chip-bg);
    color: var(--chronos-fg-muted);
    font-weight: 600;
}
.confirm-split-no:hover {
    flex-grow: 1.55;
    background: var(--chronos-hover-bg);
    color: var(--chronos-fg-primary);
}
.confirm-split-yes {
    position: relative;
    flex-grow: 1.15; /* the primary action leads slightly at rest */
    background: linear-gradient(135deg, var(--chronos-violet) 0%, var(--chronos-lavender) 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.confirm-split.is-danger .confirm-split-yes {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
}
.confirm-split-yes:hover { flex-grow: 1.7; filter: brightness(1.08); }
/* The side not being courted politely steps back. */
.confirm-split:hover > :not(:hover) { opacity: 0.72; }
/* One-shot sheen sweeping across the confirm segment when it arms. */
.confirm-split-yes::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    transform: translateX(-140%) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    pointer-events: none;
}
.confirm-split-yes:hover::after { animation: confirm-sheen 0.55s ease 0.05s 1 both; }
@keyframes confirm-sheen {
    from { transform: translateX(-140%) skewX(-18deg); }
    to   { transform: translateX(360%)  skewX(-18deg); }
}
/* Armed halo around the whole pill - violet normally, ember red on danger. */
.confirm-split:has(.confirm-split-yes:hover) { box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35); }
.confirm-split.is-danger:has(.confirm-split-yes:hover) { box-shadow: 0 4px 18px rgba(239, 68, 68, 0.38); }
.confirm-split-no:active,
.confirm-split-yes:active { filter: brightness(0.9); }
.confirm-split-no:focus-visible,
.confirm-split-yes:focus-visible {
    outline: 2px solid var(--chronos-violet);
    outline-offset: -3px;
}
@media (prefers-reduced-motion: reduce) {
    .confirm-split-no, .confirm-split-yes { transition: background 0.18s ease, color 0.18s ease; }
    /* Pin the resting sizes - no tug-of-war motion, colour feedback only. */
    .confirm-split-no:hover  { flex-grow: 1; }
    .confirm-split-yes:hover { flex-grow: 1.15; }
    .confirm-split-yes:hover::after { animation: none; }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* The ✕ close chip. The glyph sits on the text baseline, so inside a text pill's
   asymmetric padding it rendered visibly off-centre. A fixed square with flex
   centring puts it dead-centre regardless of the glyph's font metrics. */
.chip.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    flex: none;
}

.modal-search {
    border: 1px solid var(--chronos-outline);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    background: white;
    outline: none;
}
.modal-search:focus { border-color: var(--chronos-violet); }

/* ---- Unified combobox ------------------------------------------------------
   A native <select> paints its own OS dropdown chrome (grey caret, platform
   font, square corners) which clashes with the rest of the surface. Every
   <select> in the app carries .chronos-select so they all read identically:
   .modal-search's box + a custom violet caret drawn as an inline SVG data-URI
   (no asset/network dependency). Size-specific overrides (e.g. the compact
   calendar selects) layer on top via a more specific selector. */
.chronos-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--chronos-outline);
    border-radius: 8px;
    padding: 10px 34px 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--chronos-fg-primary);
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%237C3AED' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    outline: none;
}
.chronos-select:hover { border-color: var(--chronos-day-muted); }
.chronos-select:focus { border-color: var(--chronos-violet); }

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.modal-check input[type="checkbox"] {
    accent-color: var(--chronos-violet);
    width: 16px;
    height: 16px;
}

.modal-section input[type="range"] {
    accent-color: var(--chronos-violet);
    width: 100%;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

button.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--chronos-violet);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    padding: 9px 22px;
    font-weight: 600;
    cursor: pointer;
}
button.primary:hover { background: var(--chronos-lavender); }

/* Icon-bearing primaries (flash_on on Generate, mic on the voice reopen): at the
   stock 24px the icon dwarfed the 14px label and rode above its centreline. Sized
   near the text and vertically centred by the flex row above. */
button.primary .material-icons {
    font-size: 18px;
    line-height: 1;
}

