/* "Your brand" panel (site/assets/js/brand.js; brand import, 2026-09-30). Loaded by
   site/pages/_brand-kit.html on the order and account pages only. Uses the site's custom
   properties from styles.css; the brand's own colours are set on the preview by script. */

.brand-panel { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem 1.2rem; background: var(--white); }
.brand-panel legend { padding: 0 .35rem; }
.brand-choice { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-bottom: .5rem; }
.brand-choice .field { flex-basis: 100%; margin-top: .5rem; }
.brand-start { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: .75rem 0; }
.brand-start-option h3 { font-size: 1.05rem; }
.brand-url-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.brand-url-row input { flex: 1 1 14rem; min-width: 0; }
.brand-url-row .cta { margin: 0; }

/* Two columns only when the panel itself is wide (the order form is a narrow column). */
.brand-panel { container-type: inline-size; }
.brand-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.brand-side { order: -1; }
@container (min-width: 52rem) {
  .brand-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .brand-side { order: 0; position: sticky; top: 1rem; }
}
.brand-editor h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }

.brand-colour { display: grid; grid-template-columns: minmax(7rem, 1fr) 44px 6.5rem auto; gap: .5rem; align-items: center;
  padding: .25rem .4rem; border-radius: 8px; margin-bottom: .25rem; }
.brand-colour label { font-weight: 600; color: var(--navy); }
.brand-colour.active { background: var(--paper); outline: 2px solid var(--amber-deep); }
.brand-colour input[type="color"] { width: 44px; height: 44px; padding: 2px; border: 1px solid var(--rule); border-radius: 8px; background: var(--white); }
.brand-colour .hex { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; width: 100%; min-height: 44px; }
.brand-colour .hex[aria-invalid="true"] { border-color: var(--amber-deep); }
/* A narrow panel (phones): the name on its own line, then the picker, the hex and Remove. */
@container (max-width: 30rem) {
  .brand-colour { grid-template-columns: 44px minmax(0, 7.5rem) auto; }
  .brand-colour label { grid-column: 1 / -1; }
}

.brand-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.brand-chips .hint { flex-basis: 100%; margin: 0; }
.brand-chips .chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .7rem; border: 1px solid var(--rule);
  border-radius: 999px; background: var(--white); color: var(--charcoal); font: .85rem ui-monospace, "SFMono-Regular", Menlo, monospace; cursor: pointer; }
.brand-chips .chip:hover { border-color: var(--navy); }
.swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); flex: none; }

.brand-logo-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.brand-logo { border: 1px solid var(--rule); border-radius: 10px; padding: .6rem; display: flex; flex-direction: column; gap: .3rem; }
.brand-logo-img { height: 72px; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: .5rem;
  background: repeating-conic-gradient(#e9e6df 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.brand-logo.ground-dark .brand-logo-img { background: #1b1f27; }
.brand-logo-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo .check { min-height: 36px; margin: 0; }
.brand-logo .small { font-size: .85rem; font-weight: 600; color: var(--navy); }
.brand-logo .hint { margin: 0; font-size: .82rem; }
.brand-logo .linkish { align-self: flex-start; }

.brand-more { margin: .75rem 0; }
.brand-more summary { cursor: pointer; font-weight: 600; color: var(--navy); min-height: 44px; display: flex; align-items: center; }

.brand-preview { margin: 0; display: grid; gap: .6rem; }
.bp-title { container-type: inline-size; aspect-ratio: 16 / 9; border-radius: 10px; padding: 6% 7%; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.bp-title p { margin: 0; color: inherit; }
.bp-title .bp-eyebrow { font-size: 2.6cqi; letter-spacing: .12em; font-weight: 600; }
.bp-title .bp-heading { font-size: 6.4cqi; font-weight: 700; line-height: 1.12; margin: .35em 0 .45em; }
.bp-title .bp-sub { font-size: 3cqi; opacity: .92; }
.bp-bar { display: block; width: 10cqi; height: 1cqi; border-radius: 2px; margin-bottom: .6em; }
.bp-logo, .bp-wordmark { position: absolute; top: 6%; right: 6%; max-width: 32%; height: 16%; display: flex; align-items: center; }
.bp-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bp-logo.plate { padding: 2.5%; border-radius: 6px; }
.bp-wordmark { font-weight: 700; font-size: .85rem; height: auto; }
.bp-lower { display: grid; grid-template-columns: .45rem 1fr auto; gap: .9rem; align-items: center; padding: .7rem .9rem .7rem 0;
  border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); min-height: 4.2rem; }
.bp-lower p { margin: 0; }
.bp-lower .bp-strip { align-self: stretch; }
.bp-lower .bp-name { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.bp-lower .bp-role { font-size: .88rem; }
.bp-lower .bp-logo, .bp-lower .bp-wordmark { position: static; max-width: 7rem; height: 2.2rem; }

.brand-checks ul { list-style: none; padding: 0; margin: 0; }
.brand-checks li { padding: .35rem 0 .35rem 1.6rem; position: relative; font-size: .94rem; }
.brand-checks li::before { position: absolute; left: 0; top: .35rem; font-weight: 700; }
.brand-checks li.ok::before { content: "\2713"; color: #1d7a46; }
.brand-checks li.bad::before { content: "!"; color: var(--amber-deep); }
.brand-checks li.warn::before { content: "i"; color: var(--blue); }

.brand-confirm { margin-top: 1.25rem; padding: .6rem .8rem; background: var(--paper); border-radius: 8px; }
.brand-manager { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.brand-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.brand-list button { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--rule); border-radius: 999px; }
.brand-list button.current { border-color: var(--navy); background: var(--paper); }
.brand-panel .form-status.bad { color: var(--amber-deep); font-weight: 600; }
