/*  The content workspace shared by both ways of making a site's pages: writing them from the site
    description, and pulling them out of an uploaded document.

    Built on the palette admin.css already establishes - #060816 canvas, the #533e7e/#3c3666 panel
    gradient, #87b1d6 accent, 20px outer radius - so the screen reads as part of the product rather
    than as a page of its own. The layout is a fixed rail beside a work area, which is what the
    markup was reaching for with Tailwind classes this app does not load.  */

/*  Stated rather than inherited from Bootstrap's reboot, so a full-width field with padding and a
    border cannot push the page sideways if this component is ever used without it.  */
.workspace,
.workspace *,
.workspace *::before,
.workspace *::after {
    box-sizing: border-box;
}

/*  The tokens the content surfaces share: the generation workspace, and the editor that appears over
    a preview. Declared on the surfaces themselves rather than on :root, so names this generic cannot
    reach the rest of the app.  */
.workspace,
.draggable-popup-dialog,
.editor-window {
    --edge: rgba(255, 255, 255, 0.08);
    --edge-strong: rgba(255, 255, 255, 0.16);
    --ink: #ffffff;
    --ink-dim: #b9b6cd;
    --ink-faint: #817d99;
    --accent: #87b1d6;
    --accent-bright: #b0daff;
    --live: #63f0f9;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-raised: linear-gradient(to bottom, #533e7e, #3c3666);
    --surface-active: linear-gradient(to bottom, #63358d, #7d3d7b);
}

.workspace {
    display: grid;
    grid-template-columns: 304px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 4px 4px 28px;
    color: var(--ink);
}

@media (max-width: 1100px) {
    .workspace {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------------------------------------------------------------- rail --- */

.rail {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
    border: 1px solid var(--edge);
    border-radius: 20px;
    background: rgba(12, 10, 28, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.rail__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--edge);
}

.rail__title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.rail__count {
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-faint);
}

.rail__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/*  While reordering, the move buttons sit beside the row rather than inside it: the row itself is a
    button, and a button cannot hold another one.  */
.rail__row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rail__row .rail__item {
    flex: 1 1 auto;
    min-width: 0;
}

.rail__move {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
}

.rail__movebtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 18px;
    border: 1px solid var(--edge-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink-dim);
    font-size: 0.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

.rail__movebtn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    color: var(--ink);
}

.rail__movebtn:disabled {
    opacity: 0.3;
    cursor: default;
}

.rail__item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ink-dim);
    font-size: 0.88rem;
    text-align: left;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.rail__item:hover {
    background: var(--surface);
    color: var(--ink);
}

.rail__item--active {
    background: var(--surface-active);
    border-color: var(--edge-strong);
    color: var(--ink);
    box-shadow: 0 6px 18px -10px rgba(125, 61, 123, 0.9);
}

.rail__index {
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-faint);
    text-align: right;
}

.rail__item--active .rail__index {
    color: var(--accent-bright);
}

.rail__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*  Two dots, written and illustrated, so the state of every page reads at a glance instead of
    having to click through them one by one.  */
.rail__state {
    display: inline-flex;
    gap: 4px;
}

.rail__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--ink-faint);
}

.rail__dot--on {
    border-color: transparent;
    background: var(--live);
    box-shadow: 0 0 8px rgba(99, 240, 249, 0.55);
}

.rail__dot--photos.rail__dot--on {
    background: var(--accent-bright);
    box-shadow: 0 0 8px rgba(176, 218, 255, 0.5);
}

.rail__foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--edge);
    background: rgba(0, 0, 0, 0.18);
}

.rail__extra {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/*  Only ever shown once the rail is stacked above the work area; see the narrow-screen block.  */
.rail__toggle {
    display: none;
}

/*  Narrow screens: the rail stacks on top of the work area, so it must not stay stuck to the
    viewport - sticky there laid the list over the text being edited - and it must not fill the
    screen either. It collapses to its current page, with Save all still in reach, and the list
    itself is capped so that a long menu scrolls inside the rail rather than burying the page.  */
@media (max-width: 1100px) {
    .rail {
        position: static;
        max-height: none;
    }

    .rail__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 12px 16px;
        border: 0;
        border-bottom: 1px solid var(--edge);
        background: var(--surface);
        color: var(--ink);
        font-size: 0.9rem;
        text-align: left;
        cursor: pointer;
    }

    .rail__toggle:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .rail__current {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
    }

    .rail__chevron {
        flex: 0 0 auto;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--accent);
    }

    .rail__list {
        max-height: 46vh;
    }

    .rail--collapsed .rail__list,
    .rail--collapsed .rail__extra {
        display: none;
    }
}

/* ------------------------------------------------------------- controls --- */

.act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--edge-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.act:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.act:active:not(:disabled) {
    transform: translateY(1px);
}

.act:disabled {
    opacity: 0.45;
    cursor: default;
}

.act--primary {
    border-color: transparent;
    background: var(--accent);
    color: #0b1020;
    font-weight: 600;
}

.act--primary:hover:not(:disabled) {
    background: var(--accent-bright);
    border-color: transparent;
}

.act--danger {
    border-color: rgba(255, 138, 138, 0.35);
    color: #ff9c9c;
}

.act--danger:hover {
    background: rgba(255, 92, 92, 0.14);
    border-color: rgba(255, 138, 138, 0.6);
}

.act--sm {
    padding: 6px 10px;
    font-size: 0.78rem;
    border-radius: 10px;
}

.toggle {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: var(--surface);
}

.toggle input {
    margin-top: 2px;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.toggle__text {
    display: block;
    font-size: 0.84rem;
    line-height: 1.3;
}

.toggle__hint {
    display: block;
    margin-top: 2px;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--ink-faint);
}

.source {
    padding: 10px 12px;
    border: 1px dashed var(--edge-strong);
    border-radius: 12px;
}

.source__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.source input[type="file"] {
    width: 100%;
    font-size: 0.76rem;
    color: var(--ink-dim);
}

/* --------------------------------------------------------------- stage --- */

.stage {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.notice {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 138, 138, 0.4);
    border-left-width: 3px;
    border-radius: 12px;
    background: rgba(255, 92, 92, 0.1);
    color: #ffd0d0;
    font-size: 0.85rem;
}

.hint {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--ink-dim);
}

.hint strong {
    color: var(--accent-bright);
    font-weight: 600;
}

.stage__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 384px);
    gap: 16px;
    align-items: start;
}

@media (max-width: 1240px) {
    .stage__body {
        grid-template-columns: minmax(0, 1fr);
    }
}

.panel {
    min-width: 0;
    border: 1px solid var(--edge);
    border-radius: 20px;
    background: rgba(12, 10, 28, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--edge);
}

.panel__label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.panel__meta {
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-faint);
}

.panel__body {
    padding: 16px 18px 18px;
}

.title-field {
    width: 100%;
    font-family: inherit;
    padding: 12px 16px;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: border-color 140ms ease, background 140ms ease;
}

.title-field:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(135, 177, 214, 0.1);
}

.title-field::placeholder {
    color: var(--ink-faint);
    font-weight: 400;
}

/*  The same bar as .title-field where the page's title is not editable on this screen.  */
.title-static {
    margin: 0;
    padding: 12px 16px;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: var(--surface);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/*  A labelled field in the workspace's own voice, for the short texts beside a page.  */
.field {
    display: block;
    margin-bottom: 14px;
}

.field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.field__input {
    width: 100%;
    font-family: inherit;
    padding: 10px 14px;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 140ms ease, background 140ms ease;
}

.field__input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(135, 177, 214, 0.07);
}

.field__input::placeholder {
    color: var(--ink-faint);
}

/*  A file input carries its own native button, so it wants less padding than a text field.  */
input[type="file"].field__input {
    padding: 8px 10px;
    font-size: 0.78rem;
    color: var(--ink-dim);
    cursor: pointer;
}

.field__hint {
    display: block;
    margin-top: 5px;
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--ink-faint);
}

/*  The buttons that write a page, above its text.  */
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

/*  The plain page text, where the branch edits it as text rather than through a rich editor.  */
.page-text {
    width: 100%;
    font-family: inherit;
    min-height: 460px;
    padding: 16px;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: #ded9f2;
    font-size: 0.88rem;
    line-height: 1.65;
    resize: vertical;
}

.page-text:focus {
    outline: none;
    border-color: var(--accent);
}

.progress-note {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: var(--surface);
    font-size: 0.85rem;
    color: var(--ink-dim);
}

/* --------------------------------------------------------------- shots --- */

.shots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: 560px;
    overflow-y: auto;
    padding: 16px 18px 18px;
}

.shot {
    position: relative;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: var(--surface-raised);
    overflow: hidden;
}

.shot__frame {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.shot__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shot__idx {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(6, 8, 22, 0.78);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    color: var(--accent-bright);
}

.shot__wait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--ink-faint);
}

/*  The actions sit on the image and surface on hover, so a column of eight slots reads as pictures
    rather than as a wall of buttons. Keyboard focus brings them up too.  */
.shot__bar {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid var(--edge);
    background: rgba(6, 8, 22, 0.5);
    opacity: 0.55;
    transition: opacity 140ms ease;
}

.shot:hover .shot__bar,
.shot:focus-within .shot__bar {
    opacity: 1;
}

.shot__bar .act {
    flex: 1 1 auto;
    padding: 5px 6px;
    font-size: 0.72rem;
    border-radius: 9px;
}

.shot__desc {
    padding: 0 10px 10px;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--ink-faint);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* --------------------------------------------------------------- empty --- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 72px 24px;
    border: 1px dashed var(--edge-strong);
    border-radius: 20px;
    background: rgba(12, 10, 28, 0.4);
    text-align: center;
}

.empty__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.empty__text {
    margin: 0;
    max-width: 46ch;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ink-dim);
}

.muted {
    margin: 0;
    padding: 18px;
    font-size: 0.85rem;
    color: var(--ink-faint);
}

.working {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 72px 24px;
    color: var(--ink-dim);
}

/*  The global scrollbar in admin.css is a white track with a teal thumb, which is loud inside a
    dark panel. These two surfaces get a quiet one.  */
.rail__list::-webkit-scrollbar,
.shots::-webkit-scrollbar {
    width: 10px;
}

.rail__list::-webkit-scrollbar-track,
.shots::-webkit-scrollbar-track {
    background: transparent;
}

.rail__list::-webkit-scrollbar-thumb,
.shots::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.16);
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: 999px;
}

.rail__list::-webkit-scrollbar-thumb:hover,
.shots::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.28);
}

/*  The rich text editor the document branch embeds.  */
.menu-item-editor .rz-html-editor {
    border: 1px solid var(--edge, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    overflow: hidden;
}

.menu-item-editor .rz-textarea {
    border-radius: 12px;
}

/* ============================================================== editor === */
/*  The editor that appears over a preview: the tool rail on the left, the bar across the top, and
    the draggable dialogs they open. Same tokens as the workspace above, so moving between writing a
    site's pages and editing them does not feel like moving between two products.

    admin.css styles these first; this file is linked after it, so these rules win at equal
    specificity. Position and size stay untouched - Radzen writes those inline as the user drags.  */

.editor-window {
    max-width: 232px !important;
    min-width: 232px !important;
    padding: 10px !important;
    border: 1px solid var(--edge);
    border-radius: 20px;
    background: rgba(12, 10, 28, 0.86) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.95);
}

.editor-window .reference-button {
    gap: 10px;
    padding: 11px 12px !important;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--ink-dim);
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.editor-window .bg-panel-gradient {
    background: var(--surface) !important;
}

.editor-window button:hover .reference-button {
    background: var(--surface-active) !important;
    border-color: var(--edge-strong);
    color: var(--ink);
}

.editor-window .text-content strong {
    font-size: 0.88rem;
    font-weight: 600;
}

.editor-window .text-content p,
.editor-window .text-content small,
.editor-window .reference-button .text-muted {
    font-size: 0.73rem;
    line-height: 1.3;
    color: var(--ink-faint) !important;
}

.editor-window .icon-circle {
    width: 30px;
    height: 30px;
    font-size: 14px;
    background: var(--surface-raised);
    border: 1px solid var(--edge);
    color: var(--accent-bright);
}

.editor-window button:hover .icon-circle {
    background: rgba(255, 255, 255, 0.12);
    color: var(--ink);
}

/* ------------------------------------------------------------ top bar --- */

.top-panel {
    border: 1px solid var(--edge);
    border-top: 0;
    background: rgba(12, 10, 28, 0.9) !important;
    backdrop-filter: blur(10px);
    color: var(--ink) !important;
}

.top-panel .btn {
    border-radius: 10px;
    border: 1px solid var(--edge-strong);
    background: var(--surface);
    color: var(--ink);
}

.top-panel .btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
    color: var(--ink) !important;
}

/* ------------------------------------------------------------ dialogs --- */

.draggable-popup-dialog {
    border: 1px solid var(--edge);
    border-radius: 20px !important;
    background: rgba(12, 10, 28, 0.94) !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px -32px rgba(0, 0, 0, 0.95) !important;
    color: var(--ink) !important;
}

.draggable-popup-dialog .rz-dialog-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink) !important;
}

.draggable-popup-dialog .rz-dialog-titlebar {
    border-bottom: 1px solid var(--edge);
}

/*  The grouped rows inside a dialog: content groups, content items, uploads.  */
.draggable-popup-dialog .bg-panel {
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: var(--surface) !important;
}

.draggable-popup-dialog .reference-button {
    border-radius: 14px;
    padding: 11px 14px !important;
}

.draggable-popup-dialog .list-group-item {
    padding: 4px 0 !important;
}

.draggable-popup-dialog .icon-circle {
    width: 30px;
    height: 30px;
    font-size: 13px;
    background: var(--surface-raised);
    border: 1px solid var(--edge);
}

/*  Form controls, which admin.css leaves as a translucent white slab with no border.  */
.draggable-popup-dialog .form-control {
    border: 1px solid var(--edge) !important;
    border-radius: 12px !important;
    background: var(--surface) !important;
    color: var(--ink) !important;
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.5;
    transition: border-color 140ms ease, background 140ms ease;
}

.draggable-popup-dialog .form-control:focus {
    outline: none;
    border-color: var(--accent) !important;
    background: rgba(135, 177, 214, 0.08) !important;
    box-shadow: none;
}

.draggable-popup-dialog .form-control::placeholder {
    color: var(--ink-faint);
}

/*  admin.css sets `label { display: unset !important }` globally, which computes to inline and
    lays a form's captions beside its fields instead of above them. Put that back here.  */
.draggable-popup-dialog label {
    display: block !important;
    margin-bottom: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint) !important;
}

.draggable-popup-dialog .form-check-label {
    display: inline !important;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink) !important;
}

.draggable-popup-dialog .btn {
    border-radius: 10px;
    border: 1px solid var(--edge-strong);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.85rem;
}

.draggable-popup-dialog .btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
    color: var(--ink) !important;
}

.draggable-popup-dialog .btn-primary {
    border-color: transparent;
    background: var(--accent);
    color: #0b1020;
    font-weight: 600;
}

.draggable-popup-dialog .btn-primary:hover {
    background: var(--accent-bright);
    color: #0b1020 !important;
}

.draggable-popup-dialog .btn-danger,
.draggable-popup-dialog .btn-outline-danger {
    border-color: rgba(255, 138, 138, 0.35);
    background: transparent;
    color: #ff9c9c;
}

.draggable-popup-dialog .btn-danger:hover,
.draggable-popup-dialog .btn-outline-danger:hover {
    background: rgba(255, 92, 92, 0.14);
    border-color: rgba(255, 138, 138, 0.6);
    color: #ffd0d0 !important;
}

/*  A select's drop-down list is painted by the browser from the control's own background-color. The
    translucent surfaces used across the admin area left that list white, with its white option text
    unreadable, so every native select in here gets a solid colour from the same family. Radzen's own
    dropdowns are not <select> elements and are untouched.  */
.admin-body select.form-control,
.admin-body select.form-select,
.draggable-popup-dialog select.form-control,
.draggable-popup-dialog select.form-select {
    background-color: #1b1733 !important;
    background-image: none;
    color: #ffffff !important;
}

.admin-body select.form-control:focus,
.admin-body select.form-select:focus,
.draggable-popup-dialog select.form-control:focus,
.draggable-popup-dialog select.form-select:focus {
    background-color: #241e45 !important;
}

.admin-body select option,
.draggable-popup-dialog select option {
    background-color: #1b1733;
    color: #ffffff;
}

.admin-body select option:checked,
.draggable-popup-dialog select option:checked {
    background-color: #3c3666;
}

/*  A quiet line under a field saying what it is for. It sits inside the label, so it has to undo the
    label's own casing and tracking.  */
.draggable-popup-dialog .field-note {
    display: block;
    margin-top: 5px;
    font-size: 0.74rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink-faint);
}

/*  The accordion the menu editor lists its entries in.  */
.draggable-popup-dialog .rz-accordion-header {
    margin-bottom: 6px;
    border: 1px solid var(--edge) !important;
    border-radius: 14px !important;
    background: var(--surface-raised) !important;
}

.draggable-popup-dialog .rz-accordion-header a,
.draggable-popup-dialog .rz-accordion-header .rz-accordion-toggle-icon {
    color: var(--ink) !important;
}

.draggable-popup-dialog .rz-accordion-content {
    margin-bottom: 10px;
    padding: 16px !important;
    border: 1px solid var(--edge) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

/* --------------------------------------------------------- design picker --- */
/*  One design at a time, with its preview image carrying the choice.  */

.picker {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.picker__stage {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 8px;
}

.picker__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    border: 1px solid var(--edge-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

.picker__nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
}

.picker__nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.picker__card {
    margin: 0;
    min-width: 0;
    border: 1px solid var(--edge);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
}

.picker__shot {
    position: relative;
    aspect-ratio: 16 / 10;
    background: rgba(0, 0, 0, 0.35);
}

.picker__shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.picker__noshot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-faint);
}

.picker__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(6, 8, 22, 0.82);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--live);
}

.picker__meta {
    padding: 14px 16px 16px;
}

.picker__name {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.picker__desc {
    margin: 6px 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--ink-dim);
}

.picker__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.picker__tag {
    padding: 2px 9px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    font-size: 0.7rem;
    color: var(--ink-faint);
}

.picker__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.picker__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 1px solid var(--ink-faint);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.picker__dot:hover {
    border-color: var(--accent-bright);
}

.picker__dot--on {
    border-color: transparent;
    background: var(--accent-bright);
    transform: scale(1.25);
}

.picker__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.picker__count {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-faint);
}

.picker__note {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--ink-faint);
}
