/* ==========================================================================
   585 BARBER — consent notice + settings dialog
   Uses tokens from style.css. Sharp corners, gold fade hairline.
   ========================================================================== */
.bp-notice {
  position: fixed; z-index: 95; left: 50%; bottom: 24px;
  width: min(1080px, calc(100% - 48px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 40px;
  padding: 22px 28px;
  color: var(--text);
  background: rgba(21, 20, 18, .95);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  opacity: 0; transform: translate(-50%, 24px);
  transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.bp-notice[hidden] { display: none; }
.bp-notice.is-visible { opacity: 1; transform: translate(-50%, 0); }
.bp-notice::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(220,167,53,0), rgba(220,167,53,.6) 45%, var(--gold) 85%, var(--gold-hi));
}
.bp-notice__title {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1;
}
.bp-notice__title em, .bp-dialog__title em {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; text-transform: none; color: var(--gold); font-size: 1.08em;
}
.bp-notice__text p:not(.bp-notice__title) { margin-top: 8px; max-width: 58ch; font-size: .88rem; line-height: 1.55; color: var(--muted); }
.bp-notice a { color: var(--text); border-bottom: 1px solid var(--line-gold); transition: color .3s, border-color .3s; }
.bp-notice a:hover { color: var(--gold-hi); border-color: var(--gold); }
.bp-notice__actions { display: flex; align-items: center; gap: 10px; }
.bp-notice__more {
  margin-left: 6px; padding: 8px 2px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); transition: color .3s, border-color .3s;
}
.bp-notice__more:hover { color: var(--gold-hi); border-color: var(--gold); }

/* Buttons: equal size and weight for accept / necessary */
.bp-btn {
  height: 46px; padding: 0 22px; white-space: nowrap;
  font-family: var(--f-sans); font-weight: 700; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text); border: 1px solid var(--gold); border-radius: var(--radius); background: transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.bp-btn:hover { background: rgba(220, 167, 53, .12); color: var(--gold-hi); }
.bp-btn--solid { background: var(--gold); color: var(--ink); }
.bp-btn--solid:hover { background: var(--gold-hi); color: var(--ink); }
.bp-btn:active { transform: translateY(1px); }

/* Settings dialog */
.bp-dialog {
  width: min(600px, calc(100vw - 24px)); max-width: none; max-height: calc(100svh - 24px);
  margin: auto; padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible;
}
.bp-dialog::backdrop { background: rgba(8, 7, 6, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bp-dialog__inner {
  position: relative; padding: clamp(26px, 4vw, 44px); max-height: calc(100svh - 24px); overflow-y: auto;
  background: var(--coal); border: 1px solid var(--line-gold); box-shadow: 0 60px 120px -30px rgba(0, 0, 0, .8);
}
.bp-dialog[open] .bp-dialog__inner { animation: bp-in .6s var(--ease); }
@keyframes bp-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.bp-dialog__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; transition: border-color .3s, transform .5s var(--ease); }
.bp-dialog__close:hover { border-color: var(--gold); transform: rotate(90deg); }
.bp-dialog__close svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.6; }
.bp-dialog__title { padding-right: 48px; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 5vw, 2.8rem); line-height: .95; }
.bp-dialog__lead { margin-top: 14px; color: var(--muted); font-size: .92rem; }
.bp-cats { margin-top: 24px; border-top: 1px solid var(--line); }
.bp-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.bp-cat__name { display: block; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.2rem; line-height: 1.1; cursor: pointer; }
.bp-cat__text p:not(.bp-cat__name) { margin-top: 4px; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.bp-cat__fixed { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }

/* Square switch, matches the sharp UI */
.bp-switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; margin: 0; cursor: pointer;
  width: 52px; height: 28px; border: 1px solid var(--line-2); background: var(--ink); border-radius: var(--radius);
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.bp-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--muted);
  transition: transform .45s var(--ease), background-color .35s var(--ease);
}
.bp-switch:checked { background: rgba(220, 167, 53, .2); border-color: var(--gold); }
.bp-switch:checked::after { transform: translateX(24px); background: var(--gold); }
.bp-switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.bp-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

@media (max-width: 899px) {
  .bp-notice {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto;
    grid-template-columns: minmax(0, 1fr); padding: 20px; transform: translateY(24px);
  }
  .bp-notice.is-visible { transform: none; }
  .bp-notice__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bp-notice__actions .bp-btn { width: 100%; padding: 0 10px; }
  .bp-notice__more { grid-column: 1 / -1; justify-self: center; margin: 2px 0 0; }
}
@media (max-width: 479px) {
  .bp-dialog__actions .bp-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-notice, .bp-dialog[open] .bp-dialog__inner { transition: none; animation: none; }
}
