/* In-console settings view: vertical tab rail + one panel card.
 *
 * Loaded only by templates/admin_bookings.html, alongside that template's
 * inline console styles. It is linked from <head> BEFORE that inline <style>
 * block, so every selector here is scoped under .set-body to out-specify the
 * inline .set-scroll / .set-wrap rules it deliberately overrides.
 *
 * Colors come exclusively from the --ops-* console theme variables (declared on
 * :root / #ops-app and re-declared under [data-theme="light"]) so the rail
 * themes with the rest of the console in both modes. No literal colors here. */

/* ---- layout: rail beside a single panel card ---- */

.set-body {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    gap: 18px;
    min-height: 0;
    min-width: 0;
    padding: 16px 20px 20px;
    overflow: hidden;
}

.set-rail {
    flex: 0 0 auto;
    width: 210px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 16px;
    border-right: 1px solid var(--ops-border);
    overflow-y: auto;
}

.set-rail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ops-text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-left: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 9px 11px;
    cursor: pointer;
}

.set-rail-item .icon {
    flex: 0 0 auto;
    opacity: 0.75;
}

.set-rail-item:hover {
    background: var(--ops-surface-2);
    color: var(--ops-text);
}

.set-rail-item[aria-selected="true"] {
    background: var(--ops-surface);
    border-color: var(--ops-border);
    border-left-color: var(--ops-accent);
    color: var(--ops-text);
    font-weight: 600;
    box-shadow: 0 1px 2px var(--ops-shadow);
}

.set-rail-item[aria-selected="true"] .icon {
    color: var(--ops-accent);
    opacity: 1;
}

.set-rail-item:focus-visible {
    outline: 2px solid var(--ops-accent);
    outline-offset: 1px;
}

/* The panel card. Only the active .set-section is in flow; the rest carry the
   `hidden` attribute, so this column never becomes one long scroll. It sits a
   layer below .set-card so the cards inside it still read as raised. */
.set-body > .set-scroll {
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    background: var(--ops-bg);
    border: 1px solid var(--ops-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px 24px;
}

.set-body .set-wrap {
    max-width: 800px;
    gap: 0;
}

.set-body .set-section[hidden] {
    display: none;
}

/* style.css sets a light-page h2 color globally; the panel heading has to read
   as console text on the console surface. */
.set-body .set-section > h2 {
    color: var(--ops-text);
}

/* Email-templates panel: the message shown when that script is not present. */
.set-body .set-missing {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ops-text-dim);
    border: 1px dashed var(--ops-border-strong);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}

/* ---- narrow viewports: the rail becomes a scrollable strip on top ---- */

@media (max-width: 720px) {
    .set-body {
        flex-direction: column;
        gap: 10px;
        padding: 12px 12px 16px;
    }

    .set-rail {
        width: auto;
        flex-direction: row;
        gap: 6px;
        padding: 0 0 9px;
        border-right: 0;
        border-bottom: 1px solid var(--ops-border);
        overflow-x: auto;
        overflow-y: hidden;
    }

    .set-rail-item {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
        border-left-width: 1px;
        border-bottom: 2px solid transparent;
    }

    .set-rail-item[aria-selected="true"] {
        border-left-color: var(--ops-border);
        border-bottom-color: var(--ops-accent);
    }
}
