/*
 * static/css/pro.css — batch 5 (plan R-108, spec batch5.md §3.2–§3.5): the larger model's request entry in the
 * picker, the Settings dialog's tabs and its request tab (status boxes: pending yellow, accepted green, denied
 * red; Ray 2026-11-10), and the popup on access right above the composer. Lane pro-access owns this file.
 * Tokens only (tokens.css + the profile theme); every selector is defined once, here (I7).
 */

/* ---- the picker's "Request for …" entry: an action under the models, set apart by a hairline ---- */
.model-option--request { margin-top: 4px; border-top: 1px solid var(--c-outline-variant); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.model-option--request .model-option-name { color: var(--c-accent-text); font-weight: 600; }

/* ---- Settings: tabs over one panel (R-120, Ray 2026-11-15: the old pill track's tabs read as "regular text scattered
   about"). Narrow (phones): the title, then ONE row of underline tabs on a hairline that scrolls sideways without a
   scrollbar; settings.js keeps the selected tab in view and names the edges with more tabs in data-fade. Wide (the
   window at least 700 px wide, settings.js SETTINGS_WIDE_QUERY): two panes, the title over a column of full-width rows
   on the left (the dashboard's left navigation, admin.css .adm-nav-link), the panel on the right past a hairline. ---- */
.settings-side { display: grid; gap: var(--space-3); min-width: 0; border-bottom: 1px solid var(--c-outline-variant); }
.settings-tabs {
    position: relative;
    display: flex;
    margin-bottom: -1px;               /* the selected tab's underline lies on the row's hairline */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs[data-fade="start"] {
    -webkit-mask-image: linear-gradient(to right, transparent, black var(--space-6));
    mask-image: linear-gradient(to right, transparent, black var(--space-6));
}
.settings-tabs[data-fade="end"] {
    -webkit-mask-image: linear-gradient(to left, transparent, black var(--space-6));
    mask-image: linear-gradient(to left, transparent, black var(--space-6));
}
.settings-tabs[data-fade="both"] {
    -webkit-mask-image: linear-gradient(to right, transparent, black var(--space-6), black calc(100% - var(--space-6)), transparent);
    mask-image: linear-gradient(to right, transparent, black var(--space-6), black calc(100% - var(--space-6)), transparent);
}
.settings-tab {
    flex: none;
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: transparent;
    color: var(--c-on-2);
    font: var(--t-label-l);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard);
}
.settings-tab:hover { background: var(--c-hover); color: var(--c-on); }
.settings-tab[aria-selected="true"] { color: var(--c-on); font-weight: 600; box-shadow: inset 0 -2px 0 var(--c-accent); }
.settings-tab:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }
/* The panel's pane fits "Time and place" (the tallest common tab: 392 px of fields at 1440, 414 on a phone where the
   detected zone wraps), so the dialog keeps its height, and the tabs their place, while the tabs switch; a taller tab
   (the request form) grows it. */
.settings-tabhost { min-height: 416px; }
.settings-tabpanel { display: grid; gap: var(--space-5); }
.settings-tabcontent { display: grid; gap: var(--space-4); min-width: 0; }
@media (min-width: 700px) {
    /* the left pane stays put while a short window scrolls the dialog */
    .settings-side { position: sticky; top: 0; align-self: start; gap: var(--space-4); padding: var(--space-6) var(--space-3); border-bottom: 0; }
    .settings-side > h3 { padding: 0 var(--space-3); }
    .settings-tabs { flex-direction: column; gap: 2px; margin-bottom: 0; overflow: visible; }
    .settings-tab { position: relative; white-space: normal; border-radius: var(--radius-sm); }
    .settings-tab[aria-selected="true"] { background: var(--c-accent-container); color: var(--c-on-accent-container); box-shadow: none; }
    /* the dashboard's gold edge: the tonal fill alone is faint on the dark dialog surface (about 1.09:1) */
    .settings-tab[aria-selected="true"]::before {
        content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-accent);
    }
    .settings-tabhost { min-height: 448px; padding: var(--space-6); border-left: 1px solid var(--c-outline-variant); }
}

/* ---- the request tab ---- */
.pro-request { display: grid; gap: var(--space-4); }
.prompt-panel .pro-lead { color: var(--c-on); font: var(--t-body-l); }
.prompt-panel .pro-status {
    justify-self: start;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font: var(--t-label-l);
    font-weight: 600;
}
.prompt-panel .pro-status--pending { background: var(--c-warning-container); color: var(--c-on-warning-container); border-color: var(--c-warning); }
.prompt-panel .pro-status--accepted { background: color-mix(in srgb, var(--c-success) 16%, var(--c-surface)); color: var(--c-on); border-color: var(--c-success); }
.prompt-panel .pro-status--denied { background: var(--c-danger-container); color: var(--c-on-danger-container); border-color: var(--c-danger); }
.pro-form { display: grid; gap: var(--space-2); }
.pro-text {
    width: 100%;
    min-height: 132px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-outline);
    background: var(--c-surface);
    color: var(--c-on);
    font: var(--t-body-m);
    line-height: 1.5;
    resize: vertical;
    outline: none;
}
.pro-text:focus { border-color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent); }
.prompt-panel .pro-count { justify-self: end; color: var(--c-on-3); font: var(--t-body-s); font-variant-numeric: tabular-nums; }
.prompt-panel .pro-count.is-over { color: var(--c-danger); font-weight: 600; }
.prompt-panel .pro-error { color: var(--c-danger); font: var(--t-body-s); }
.prompt-panel .pro-disclaimer { padding-top: var(--space-3); border-top: 1px solid var(--c-outline-variant); color: var(--c-on-3); font: var(--t-body-s); }
.pro-submit:disabled { opacity: 0.55; cursor: default; }

/* ---- the popup on access: right above the composer card, a quiet raised strip with an × ---- */
.pro-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin: 0 0 var(--space-2);
    padding: 10px 8px 10px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-primary-edge);
    background: var(--c-surface-raised);
    color: var(--c-on);
    box-shadow: var(--elev-1);
}
.pro-notice-text { flex: 1 1 auto; min-width: 0; margin: 0; padding-top: 4px; font: var(--t-body-m); line-height: 1.45; }
.pro-notice-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--c-on-2);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.pro-notice-close:hover { background: var(--c-hover); color: var(--c-on); }
.pro-notice-close:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 1px; }

@media (forced-colors: active) {
    .settings-tab[aria-selected="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
    .prompt-panel .pro-status { border-color: CanvasText; }
    .pro-notice { border-color: CanvasText; }
}
