/* "Banners" in the Website tab (site-banners.js). Uses the editor's own
   colours from styles.css. No inline styles anywhere: the colour a banner
   uses arrives as a custom property set from script. */
.bn-panel { display: grid; gap: 18px; }
.bn-loading { margin: 0; padding: 40px; border: 1px dashed #b9c7c5; border-radius: var(--radius); color: #4d5d64; text-align: center; }

.bn-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 5px 20px rgba(13, 65, 76, .08); }
.bn-state { margin: 0; color: var(--ink); font-weight: 800; }
.bn-state span { display: block; margin-top: 2px; color: #4d5d64; font-size: .88rem; font-weight: 400; }
.bn-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bn-view { align-self: center; color: var(--teal); font-size: .9rem; font-weight: 800; }

.bn-list { display: grid; gap: 14px; }
.bn-empty { border: 1px dashed #b9c7c5; border-radius: var(--radius); padding: 34px; text-align: center; }
.bn-empty h3 { margin: 0 0 6px; }
.bn-empty p { max-width: 62ch; margin: 0 auto 16px; color: #4d5d64; }

.bn-card { border: 1px solid var(--line); border-left: 7px solid var(--banner-colour, var(--teal)); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.bn-card.is-open { box-shadow: 0 8px 26px rgba(13, 65, 76, .1); }
.bn-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 16px 4px 4px; }
.bn-card-open { display: flex; flex: 1; align-items: center; gap: 12px; min-height: 56px; border: 0; border-radius: 14px; padding: 8px 12px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bn-card-open:hover { background: var(--teal-soft); }
.bn-card-open:focus-visible, .bn-swatch:focus-visible, .bn-delete:focus-visible, .bn-swatch-dot:focus-visible { outline: 3px solid var(--coral-bright); outline-offset: 2px; }
/* The dot is the switch. Filled: it goes on the site at the next publish.
   Hollow: it stays in the collection, which is where a notice lives between
   the weeks it is needed. */
.bn-swatch-dot { flex: none; width: 26px; height: 26px; margin-left: 14px; border: 3px solid var(--banner-colour, var(--teal)); border-radius: 50%; background: transparent; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.bn-swatch-dot.is-live { background: var(--banner-colour, var(--teal)); }
.bn-swatch-dot:hover { transform: scale(1.08); }
.bn-swatch-dot:focus-visible { outline: 3px solid var(--coral-bright); outline-offset: 2px; }
.bn-card.is-quiet { background: #f7f5f0; }
.bn-card.is-quiet .bn-card-title { color: #4d5d64; }
.bn-flag.is-waiting { background: var(--gold-soft); color: #5c4b18; }
.bn-card-title { display: grid; gap: 2px; font-weight: 800; }
.bn-card-title small { color: #4d5d64; font-size: .8rem; font-weight: 400; }
.bn-flag { flex: none; border-radius: 999px; padding: 4px 10px; background: #f0eee8; color: #4d5d64; font-size: .75rem; font-weight: 900; }
.bn-flag.is-live { background: var(--teal-soft); color: var(--teal-deep); }

.bn-form { display: grid; gap: 14px; padding: 4px 18px 20px; }
.bn-label { display: grid; gap: 5px; color: var(--teal-deep); font-size: .82rem; font-weight: 800; }
.bn-label input, .bn-label textarea, .bn-label select { min-height: 44px; width: 100%; border: 1px solid #9fb3b6; border-radius: 12px; padding: 9px 11px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.bn-label textarea { min-height: 96px; resize: vertical; }
.bn-label input[type="color"] { width: 68px; height: 44px; padding: 4px; cursor: pointer; }
.bn-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.bn-colours { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; }
.bn-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.bn-swatch { width: 34px; height: 34px; border: 2px solid white; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.bn-swatch.is-chosen { box-shadow: 0 0 0 2px var(--teal-deep); }

.bn-placement { display: grid; gap: 12px; }
.bn-placement > .bn-label { max-width: 420px; }
.bn-nudge { display: flex; flex-wrap: wrap; gap: 8px; }
.bn-nudge .button { min-height: 44px; }
.bn-nudge .button:disabled { opacity: .45; cursor: default; }

/* Where on the page: the page drawn as a column of its sections, with the
   gaps a banner can go in. */
.bn-where { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #faf6ee; }
.bn-where-now { margin: 0; color: var(--ink); font-size: .95rem; }
.bn-outline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.bn-outline-section { border: 1px solid #d5dedd; border-radius: 10px; padding: 7px 12px; background: #fff; color: var(--ink); font-size: .86rem; font-weight: 700; }
.bn-outline-section.is-muted { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin: 3px 0; border-style: dashed; background: transparent; color: #7a878c; font-weight: 400; }
.bn-outline-section small { color: #7a878c; font-size: .74rem; font-style: italic; }
.bn-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 26px; padding: 3px 0 3px 14px; border-left: 2px dotted #b9c7c5; margin-left: 16px; }
.bn-gap-put { min-height: 26px; border: 1px dashed #9fb3b6; border-radius: 999px; padding: 0 10px; background: transparent; color: var(--teal-deep); font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; opacity: .55; }
.bn-gap:hover .bn-gap-put, .bn-gap-put:focus-visible { opacity: 1; }
.bn-gap-put:hover { border-style: solid; background: var(--teal-soft); }
.bn-gap-put:focus-visible { outline: 3px solid var(--coral-bright); outline-offset: 2px; }
.bn-gap.is-here { border-left: 3px solid var(--banner-colour, var(--teal)); }
.bn-gap-mark { border-radius: 8px; padding: 6px 11px; background: var(--banner-colour, var(--teal)); color: var(--notice-ink, #fff); font-size: .8rem; font-weight: 900; }
.bn-gap-other { border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; background: #fff; color: #4d5d64; font-size: .76rem; font-weight: 700; }
.bn-gap-other.is-quiet { border-style: dashed; background: transparent; }

.bn-preview { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #faf6ee; }
.bn-preview-label { margin: 0 0 10px; color: #4d5d64; font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.bn-preview-event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 180px); gap: 16px; align-items: center; border-radius: 14px; padding: 18px; background: var(--notice); color: var(--notice-ink); }
.bn-preview-event:has(.bn-preview-photo) { grid-template-columns: minmax(0, 1fr) 180px; }
.bn-preview-alert { border-left: 5px solid var(--notice); border-radius: 0 12px 12px 0; padding: 12px 15px; background: #fffdf9; }
.bn-preview-alert strong { color: var(--notice); }
.bn-preview-copy { display: grid; gap: 6px; min-width: 0; }
.bn-preview-copy strong { font-family: var(--font-display); font-size: 1.15rem; }
.bn-preview-copy p { margin: 0; font-size: .92rem; opacity: .92; }
.bn-preview-notes { font-size: .84rem; font-weight: 700; opacity: .9; }
.bn-preview-link { font-size: .86rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.bn-preview-photo { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; object-fit: cover; }

.bn-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.bn-delete { min-height: 44px; border: 0; border-radius: 12px; padding: 0 14px; background: none; color: #a33434; font: inherit; font-weight: 800; cursor: pointer; }
.bn-delete:hover { background: #fdeeee; }

@media (max-width: 900px) {
  .bn-pair, .bn-preview-event { grid-template-columns: 1fr; }
  .bn-bar { position: static; }
}

/* "Assistant" panel (site-assistant.js): where the centre's own API keys go. */
.ak-warning { border: 1px solid #e5bd72; border-left: 5px solid #8a6400; border-radius: var(--radius); padding: 14px 18px; background: #fdf6e4; }
.ak-warning strong { display: block; margin-bottom: 4px; color: #5c4b18; }
.ak-warning p { max-width: 82ch; margin: 0; color: #5c4b18; font-size: .92rem; }
.bn-help { max-width: 82ch; margin: 0; color: #4d5d64; font-size: .9rem; }

/* "Assets" panel (site-assets.js): every picture the website can use, each
   with a button that copies its address for pasting into a banner or a page. */
.as-panel { display: grid; gap: 16px; }
.as-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-top: 6px; }
.as-heading h3 { margin: 0; font-size: 1.05rem; }
.as-heading span { color: #4d5d64; font-size: .86rem; }
.as-search { max-width: 340px; }
.as-drop { display: grid; justify-items: center; gap: 8px; border: 2px dashed #b9c7c5; border-radius: var(--radius); padding: 26px; background: var(--card); text-align: center; }
.as-drop.is-over { border-color: var(--teal); background: var(--teal-soft); }
.as-drop p { max-width: 62ch; margin: 0; color: #4d5d64; font-size: .92rem; }
.as-file { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.as-drop .button { cursor: pointer; }

.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.as-card { display: grid; grid-template-rows: auto auto; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.as-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #ece8e0; }
.as-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px 9px 12px; }
.as-name { display: grid; min-width: 0; color: var(--ink); font-size: .84rem; font-weight: 800; overflow-wrap: anywhere; }
.as-name small { color: #4d5d64; font-size: .74rem; font-weight: 400; }
.as-actions { display: flex; flex: none; gap: 4px; }
.as-copy, .as-delete { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.as-copy::after, .as-delete::after { display: block; width: 100%; height: 100%; content: ""; }
.as-copy::after { background: var(--teal); -webkit-mask: var(--i-link) center / 19px 19px no-repeat; mask: var(--i-link) center / 19px 19px no-repeat; }
.as-delete::after { background: #a33434; -webkit-mask: var(--i-bin) center / 18px 18px no-repeat; mask: var(--i-bin) center / 18px 18px no-repeat; }
.as-copy:hover { border-color: var(--teal); background: var(--teal-soft); }
.as-delete:hover { border-color: #a33434; background: #fdeeee; }
.as-copy.is-copied { border-color: var(--teal); background: var(--teal); }
.as-copy.is-copied::after { background: #fff; -webkit-mask: var(--i-tick) center / 20px 20px no-repeat; mask: var(--i-tick) center / 20px 20px no-repeat; }
.as-copy:focus-visible, .as-delete:focus-visible { outline: 3px solid var(--coral-bright); outline-offset: 2px; }

:root {
  --i-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10.5 13.5a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1.6 1.6'/%3E%3Cpath d='M13.5 10.5a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1.6-1.6'/%3E%3C/svg%3E");
  --i-bin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5h16M9.5 6.5V4.5h5v2M6.5 6.5l1 13h9l1-13M10 10v6M14 10v6'/%3E%3C/svg%3E");
  --i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
