/* The template editor's page frame (stream 06): the purple band of TemplateEditorHost.razor
   (AeBand.razor, AeStyles.razor "Editor page frame") and the editor below it. The band is Blazor
   markup outside .ae-editor, so it uses the panel's theme.css colours (--vn-*). The panel's layout
   links this sheet in its head (Pages/_Layout.cshtml), so the band is never shown unstyled. */

/* The band and the editor fill the window below the panel's 50 px top row. <main> clips what
   overflows it, so on a window too short for the editor's 640 px the editor area scrolls itself. */
.ae-page { display: flex; flex-direction: column; height: calc(100dvh - 50px); min-height: 0; }
.ae-page-editor { flex: 1; min-height: 0; overflow: auto; }
.ae-page-error { font-size: 14px; font-weight: 700; color: var(--vn-bad); padding: 12px 24px 0; }

.ae-band {
    background: var(--vn-band); color: #fff; height: 78px; padding: 0 20px; display: flex; align-items: center; gap: 14px;
    flex-shrink: 0; box-sizing: border-box; font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.ae-band *, .ae-band *::before, .ae-band *::after { box-sizing: border-box; }
.ae-band .ae-ic { flex-shrink: 0; display: block; }

.ae-band .ae-round {
    width: 38px; height: 38px; padding: 0; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: #fff; flex-shrink: 0; cursor: pointer;
}
.ae-band .ae-round:hover:not(:disabled) { background: rgba(255, 255, 255, .2); }
.ae-band .ae-round.is-off, .ae-band .ae-round:disabled { opacity: .4; cursor: default; }

.ae-band .ae-band-info { min-width: 0; }
.ae-band .ae-title {
    display: block; width: min(460px, 100%); margin: 0 0 0 -6px; padding: 1px 6px; border: 0; border-radius: 8px; outline: 0;
    background: transparent; color: #fff; font: 800 22px/1.15 Inter, system-ui, sans-serif; letter-spacing: -.015em;
}
.ae-band .ae-title::placeholder { color: rgba(255, 255, 255, .55); }
.ae-band .ae-title:hover, .ae-band .ae-title:focus { background: rgba(255, 255, 255, .12); }
.ae-band .ae-title:focus-visible { box-shadow: 0 0 0 2px var(--vn-focus); }

.ae-band .ae-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.ae-band .ae-chip {
    font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .92); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; margin: 0;
}
/* Selects and the length field inside a chip take the chip's look. */
.ae-band .ae-chip-field {
    border: 0; outline: 0; margin: 0; padding: 0 2px; border-radius: 4px; background: transparent; color: #fff;
    font: inherit; cursor: pointer;
}
.ae-band .ae-chip-field:focus-visible { box-shadow: 0 0 0 2px var(--vn-focus); }
.ae-band .ae-chip-field option { color: var(--vn-text); background: #fff; }
.ae-band .ae-chip-num { width: calc(6ch + 6px); text-align: center; cursor: text; }
.ae-band .ae-chip-num:hover, .ae-band .ae-chip-num:focus { background: rgba(255, 255, 255, .15); }
/* While the length follows the background video ("Długość animacji jak film"). */
.ae-band .ae-chip-num:disabled { cursor: default; opacity: .75; }
.ae-band .ae-chip-hint { margin-left: 6px; opacity: .8; font-weight: 600; }

.ae-band .ae-band-act { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ae-band .ae-vsep { width: 1px; height: 26px; background: rgba(255, 255, 255, .25); margin: 0 6px; }
.ae-band .ae-pill-ghost {
    height: 38px; padding: 0 16px 0 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12); color: #fff; font: 700 13.5px Inter, system-ui, sans-serif;
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
}
.ae-band .ae-pill-ghost:hover { background: rgba(255, 255, 255, .2); }
/* "Skopiuj szablon" while a copy is being made. */
.ae-band .ae-pill-ghost:disabled { opacity: .5; cursor: default; background: rgba(255, 255, 255, .12); }
.ae-band .ae-pill-white {
    height: 38px; padding: 0 22px; border: 0; border-radius: 999px; background: #fff; color: var(--vn-indigo);
    font: 700 13.5px Inter, system-ui, sans-serif; display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap;
}
.ae-band .ae-pill-white:hover:not(:disabled) { background: var(--vn-soft); }
.ae-band .ae-pill-white:disabled { opacity: .5; cursor: default; }
.ae-band .ae-round:focus-visible, .ae-band .ae-pill-ghost:focus-visible, .ae-band .ae-pill-white:focus-visible {
    outline: 2px solid var(--vn-focus); outline-offset: 2px;
}

/* theme.css fills every field in <main> (42 px high, 14 px !important, white with a ring on focus);
   the band's name, selects and length field keep the band's look instead. */
.ae-band .ae-title, .ae-band .ae-chip-field {
    height: auto !important; border: 0 !important; border-radius: 6px !important; color: #fff !important;
    background-color: transparent !important; box-shadow: none !important;
}
.ae-band .ae-title { font-size: 22px !important; border-radius: 8px !important; }
.ae-band .ae-chip-field { font-size: 11.5px !important; }
/* theme.css's font-size for inputs is !important behind seven :not([type=…]) filters; the same
   filters let the band's text inputs keep their sizes. */
.ae-band input.ae-title:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=button]):not([type=submit]) { font-size: 22px !important; }
.ae-band input.ae-chip-field:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=button]):not([type=submit]) { font-size: 11.5px !important; }
.ae-band .ae-title:hover, .ae-band .ae-title:focus,
.ae-band .ae-chip-num:not(:disabled):hover, .ae-band .ae-chip-num:focus { background-color: rgba(255, 255, 255, .15) !important; }
.ae-band .ae-title:focus-visible, .ae-band .ae-chip-field:focus-visible { box-shadow: 0 0 0 2px var(--vn-focus) !important; }

@media (max-width: 1023px) {
    .ae-band { flex-wrap: wrap; height: auto; min-height: 78px; padding: 10px 20px; }
    .ae-band .ae-band-act { flex-wrap: wrap; }
    /* The editor stacks its panels and the page scrolls. */
    .ae-page { height: auto; min-height: calc(100dvh - 50px); }
}
