/* Banner tab: cards, drag to reorder, switch, editor panel. Built on the tokens in app.css. */
.bn-filters { padding: 10px 14px; }
.bn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 16px; align-items: start; }

.bn-card { position: relative; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  animation: bn-in .45s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 55ms);
  transition: box-shadow .22s, border-color .22s, transform .22s, opacity .22s; }
.bn-card:hover { border-color: var(--axis); box-shadow: var(--shadow); transform: translateY(-2px); }
.bn-card.is-dim .bn-media { filter: grayscale(.6); opacity: .8; }
.bn-card.is-drag { opacity: .45; transform: scale(.975); box-shadow: none; }
@keyframes bn-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* The picture is shown whole (contain); a blurred copy of it fills the leftover space, exactly like the hero on the site. */
.bn-media, .bn-prev-frame { position: relative; overflow: hidden; background: #141414; isolation: isolate; }
.bn-media { aspect-ratio: 2 / 1; cursor: pointer; }
.bn-media .bg, .bn-prev-frame .bg { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(34px) saturate(1.2) brightness(.62); z-index: -1; }
.bn-media .fg, .bn-prev-frame .fg { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.bn-card:hover .bn-media .fg { transform: scale(1.025); }
.bn-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #8a8a85; font-size: 13px; text-align: center; padding: 16px; }
.bn-grip { position: absolute; z-index: 2; border-radius: 999px; background: rgba(14, 14, 14, .62); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .14); }
.bn-status { display: flex; align-items: center; gap: 10px; font-size: 13px; } .bn-pos { margin-left: auto; color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.bn-grip { left: 50%; top: auto; bottom: 10px; transform: translateX(-50%) translateY(6px); width: 34px; height: 24px; display: grid; place-items: center; opacity: 0; cursor: grab; transition: opacity .18s, transform .18s; }
.bn-card:hover .bn-grip { opacity: 1; transform: translateX(-50%); }
.bn-grip:active { cursor: grabbing; }
.st.is-live i { position: relative; }
.st.is-live i::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--c); animation: bn-ping 1.8s ease-out infinite; }
@keyframes bn-ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }

.bn-body { display: grid; gap: 7px; padding: 13px 14px 14px; }
.bn-title { display: flex; align-items: center; gap: 10px; } .bn-title b { flex: 1; min-width: 0; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--ink2); font-size: 13px; } .bn-meta svg { flex: none; color: var(--mute); } .bn-meta b { font-weight: 600; color: var(--ink); }
.bn-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; padding-top: 11px; border-top: 1px solid var(--line); }
.bn-act { margin-left: auto; display: flex; gap: 6px; }
.bn-empty { grid-column: 1 / -1; }

/* switch */
.sw { position: relative; display: inline-block; flex: none; width: 38px; height: 22px; cursor: pointer; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: var(--axis); transition: background .2s; }
.sw i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.sw input:checked + i { background: var(--st-won); } .sw input:checked + i::after { transform: translateX(16px); }
.sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; } .sw input:disabled { cursor: progress; }

/* editor */
.bn-drawer { width: min(720px, 100%); }
.bn-drawer .d-body { padding-bottom: 24px; }
.bn-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); } .bn-bar .err { flex: 1; min-height: 0; }
.bn-prev-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; } .bn-prev-head h3 { margin: 0; }
.bn-prev-frame { border-radius: 12px; margin: 0 auto; transition: width .3s cubic-bezier(.2, .7, .2, 1), aspect-ratio .3s; }
.bn-prev-frame.is-d { width: 100%; aspect-ratio: 1.38; } .bn-prev-frame.is-m { width: min(100%, 300px); aspect-ratio: .82; }
.bn-prev-frame .fg { animation: bn-fade .4s ease; } @keyframes bn-fade { from { opacity: 0; transform: scale(1.03); } }

.dz-wrap { display: grid; gap: 8px; justify-items: start; }
.dz { position: relative; display: grid; justify-items: center; gap: 4px; width: 100%; padding: 22px 16px; text-align: center; border: 1.5px dashed var(--axis); border-radius: 12px; background: var(--bg); color: var(--ink2); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.dz:hover, .dz.is-over { border-color: var(--accent); background: var(--accent-wash); } .dz.is-over { transform: scale(1.01); }
.dz.has { grid-template-columns: 120px 1fr; justify-items: start; text-align: left; align-items: center; gap: 2px 14px; padding: 12px; border-style: solid; border-color: var(--line); }
.dz.has img { grid-row: 1 / 3; width: 120px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 8px; }
.dz-t { font-weight: 600; color: var(--ink); } .dz-s { font-size: 12.5px; color: var(--mute); }
.dz:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.bn-warn { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); font-size: 13px; width: 100%; }
.bn-m { margin-top: 12px; } .bn-m summary { cursor: pointer; color: var(--ink2); font-size: 13px; padding: 4px 0; } .bn-m[open] summary { margin-bottom: 8px; }

.bn-fields { display: grid; gap: 12px; }
.bn-link { display: grid; gap: 12px; } .bn-link .seg { justify-self: start; }
.bn-tab { gap: 10px; }
.bn-note { display: flex; align-items: center; gap: 7px; min-height: 20px; font-size: 12.5px; color: var(--ink2); word-break: break-all; } .bn-note svg { flex: none; color: var(--mute); }
.bn-note.is-bad { color: var(--crit); }
.bn-sched { display: grid; gap: 12px; } .bn-sched .seg { justify-self: start; }
.bn-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .bn-dates .bn-presets, .bn-dates .bn-note { grid-column: 1 / -1; }
.bn-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.bn-onoff { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); } .bn-onoff .check { gap: 10px; }

/* product / collection picker */
.pick { display: grid; gap: 8px; }
.pick-sel:empty { display: none; }
.pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; transition: background .12s; }
.pick-list .pick-row:last-child { border-bottom: 0; } .pick-row:hover { background: var(--wash); }
.pick-row.is-sel { background: var(--accent-wash); } .pick-sel .pick-row { border: 1px solid var(--accent); border-radius: 10px; }
.pick-row img, .pick-row .ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--wash); flex: none; }
.pick-row .pt { flex: 1; min-width: 0; display: grid; } .pick-row b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pick-row small { color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-empty { padding: 18px; text-align: center; color: var(--mute); font-size: 13px; }

@media (max-width: 900px) {
  .bn-grid { grid-template-columns: 1fr; }
  .bn-dates { grid-template-columns: 1fr; }
  .bn-foot { gap: 6px; } .bn-grip { display: none; }
  .dz.has { grid-template-columns: 84px 1fr; } .dz.has img { width: 84px; }
}
@media (hover: none) { .bn-grip { display: none; } }

/* Banner tab: hero / promo switch, and the square promo tiles */
.bn-kinds { margin-bottom: 14px; } .bn-kinds .seg a { display: inline-flex; align-items: center; padding: 0 16px; text-decoration: none; color: inherit; }
.bn-grid.is-tile { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.is-tile .bn-media { aspect-ratio: 1 / 1; }
.is-tile .bn-media .bg { display: none; }
.is-tile .bn-media .fg { object-fit: cover; }
.is-tile .bn-act .btn-sm:not(.icon-btn) { padding-inline: 10px; }
.bn-tile-prev { display: flex; align-items: flex-end; justify-content: center; gap: 18px; padding: 18px 14px; border-radius: 12px; background: var(--wash); }
.bn-tile-prev figure { margin: 0; display: grid; gap: 8px; justify-items: center; }
.bn-tile-prev .tp-img { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #141414; box-shadow: var(--shadow); }
.bn-tile-prev img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bn-tile-prev .is-lg .tp-img { width: 168px; } .bn-tile-prev .is-md .tp-img { width: 130px; } .bn-tile-prev .is-sm .tp-img { width: 96px; border-radius: 10px; }
.bn-tile-prev figcaption { font-size: 12px; color: var(--mute); }
@media (max-width: 560px) { .bn-tile-prev { gap: 10px; } .bn-tile-prev .is-lg .tp-img { width: 120px; } .bn-tile-prev .is-md .tp-img { width: 96px; } .bn-tile-prev .is-sm .tp-img { width: 74px; } }
.bn-kinds .seg a { height: 30px; white-space: nowrap; color: var(--ink2); font-size: 13px; border-right: 1px solid var(--border); } .bn-kinds .seg a:last-child { border-right: 0; }
.bn-kinds .seg a:hover { background: var(--wash); } .bn-kinds .seg a.is-on { background: var(--ink); color: var(--bg); }
.bn-kinds .seg a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
