/* Banner Control Panel — component styles
   Layout, spacing, and typography handled by theme utilities.
   Loaded only on the Banner Control Panel page template. */

/* ── Tabs ─────────────────────────────────────────────────────────── */
.banner-panel__pane { display: none; }
.banner-panel__pane.is-active { display: block; }

/* ── Notices ──────────────────────────────────────────────────────── */
.banner-panel__denied { color: #c00; }
.banner-panel__notice { padding: 12px 16px; border-radius: 6px; background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20; }
.banner-panel__notice--warning { background: #fff8e1; border-color: #ffe082; color: #5d4037; }

/* ── Banner list ──────────────────────────────────────────────────── */
.banner-panel__list { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.banner-panel__item { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #fff; border-bottom: 1px solid #eee; gap: 16px; flex-wrap: wrap; }
.banner-panel__item:last-child { border-bottom: none; }
.banner-panel__item.is-editing { background: #f5f8ff; border-left: 4px solid #403c00; }
.banner-panel__item-info { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.banner-panel__item-title { font-size: 15px; }
.banner-panel__dates { font-size: 12px; color: #888; }
.banner-panel__dates--warning { color: #c00; }
.banner-panel__status { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 10px; }
.banner-panel__status--active { background: #e8f5e9; color: #2e7d32; }
.banner-panel__status--inactive { background: #f3f3f3; color: #777; }
.banner-panel__thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.banner-panel__thumb--empty { background: #eee; }
.banner-panel__editing-label { display: flex; align-items: center; gap: 12px; }

/* ── Section header row (heading + action button side-by-side) ────── */
.banner-panel__section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.banner-panel__section-head h2 { margin: 0; }
.banner-panel__section-title { margin: 0 0 8px; }
.banner-panel__section-desc { color: #666; }

/* ── Live preview ─────────────────────────────────────────────────── */
.banner-panel__preview { position: relative; padding: 20px; background: #f0f0f0; border: 1px solid #ddd; border-radius: 8px; }
.banner-panel__preview-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #888; margin: 0 0 12px; }
.banner-panel__preview-inner { pointer-events: none; }

/* TinyMCE's skin ships `.mce-tinymce-inline { width: 100% }`, so the inline
   toolbar spans the whole preview. Shrink-wrap it to its buttons instead. Two
   classes, not !important: the skin CSS is injected at runtime after this file,
   so an equal-specificity rule would lose. Only the inline toolbar matches —
   the field's own editor below is not inline, so it is untouched. */
.mce-tinymce.mce-tinymce-inline { width: auto; max-width: 100%; }

/* An explicit display: on a class outranks the UA [hidden] rule, so restore it. */
[hidden] { display: none !important; }

/* Copy / paste box */
.banner-panel__transfer { padding: 14px; background: #fff; border: 1px solid #ddd; border-radius: 8px; }
.banner-panel__transfer-label { font-size: 12px; color: #666; margin: 0 0 8px; }
.banner-panel__transfer-box { width: 100%; font-family: monospace; font-size: 12px; padding: 8px; border: 1px solid #ccc; border-radius: 6px; resize: vertical; }
.banner-panel__transfer-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.banner-panel__transfer-msg { font-size: 12px; color: #666; }

/* Save shortcut below the preview */
.banner-panel__save-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
/* Buttons right, hint pushed to the left — order, not markup, so the primary
   action stays first in the DOM for keyboard and screen-reader order. */
.banner-panel__save-hint { font-size: 12px; color: #888; order: -1; margin-right: auto; }

/* Inline editing: only the bound regions become interactive, so the preview's
   buttons and links stay inert and can't navigate away from unsaved edits. */
.banner-panel__preview [data-hb-field],
.banner-panel__preview [data-hb-jump],
.banner-panel__preview [data-hb-rich] { pointer-events: auto; cursor: pointer; }
.banner-panel__preview [data-hb-field],
.banner-panel__preview [data-hb-rich] { cursor: text; }
.banner-panel__preview [data-hb-field]:hover,
.banner-panel__preview [data-hb-jump]:hover,
.banner-panel__preview [data-hb-rich]:hover { outline: 2px dashed rgba(157,30,101,.55); outline-offset: 2px; }
.banner-panel__preview [data-hb-field]:focus,
.banner-panel__preview [data-hb-rich]:focus { outline: 2px solid #9D1E65; outline-offset: 2px; }

/* ── Inline form ──────────────────────────────────────────────────── */
.banner-panel__form { padding: 24px 20px; background: #fafafa; border: 1px solid #ddd; border-radius: 8px; }

/* ── Tab nav ──────────────────────────────────────────────────────── */
.banner-panel__nav { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid #e0e0e0; display: flex; gap: 4px; padding: 8px 0; flex-wrap: wrap; margin-bottom: 24px; }
.banner-panel__nav a { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 20px; text-decoration: none; color: #555; transition: background .15s, color .15s; }
.banner-panel__nav a:hover { background: #f0f0f0; color: #222; }
.banner-panel__nav a.is-active { background: #403c00; color: #fff; }

/* ── Login card ───────────────────────────────────────────────────── */
.banner-panel__login-wrap { display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px; }
.banner-panel__login-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 40px 36px; width: 100%; max-width: 400px; box-shadow: 0 4px 24px rgba(0,0,0,.07); }
.banner-panel__login-logo { text-align: center; margin-bottom: 24px; }
.banner-panel__login-logo svg { width: 44px; height: 44px; }
.banner-panel__login-heading { font-size: 22px; margin: 0 0 6px; text-align: center; }
.banner-panel__login-sub { font-size: 14px; color: #888; text-align: center; margin: 0 0 28px; }
.banner-panel__login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.banner-panel__login-field label { font-size: 13px; font-weight: 600; color: #444; }
.banner-panel__login-field input[type="text"],
.banner-panel__login-field input[type="password"] { border: 1px solid #d0d0d0; border-radius: 7px; padding: 10px 14px; font-size: 15px; width: 100%; box-sizing: border-box; transition: border-color .15s; outline: none; }
.banner-panel__login-field input:focus { border-color: #9D1E65; box-shadow: 0 0 0 3px rgba(157,30,101,.1); }
.banner-panel__login-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; margin-bottom: 24px; cursor: pointer; }
.banner-panel__login-remember input { width: 16px; height: 16px; accent-color: #9D1E65; cursor: pointer; }
.banner-panel__login-btn { width: 100%; padding: 12px; font-size: 15px; }
.banner-panel__login-btn:disabled { opacity: .65; cursor: not-allowed; }
.banner-panel__login-error { display: none; margin-top: 16px; padding: 10px 14px; border-radius: 7px; background: #fdf0f5; border: 1px solid #f0b8d4; color: #9D1E65; font-size: 13px; text-align: center; }
