/* Scream Time cookie consent — banner + preferences.
   Colours are the 2026 palette from includes/inc_header_2026.php, written out
   literally because the older header.php-only pages don't define those vars.
   Reject and Accept are deliberately identical in size, colour and weight: the
   ICO/EDPB position is that refusing must be no harder than accepting, so this
   is a compliance constraint rather than a style choice. Don't make Accept
   louder than Reject. */

.st-consent {
  position: fixed;
  z-index: 2147483000; /* above the sticky bar, exit popup and Bootstrap modals */
  left: 0;
  right: 0;
  bottom: 0;
  background: #161315;
  border-top: 2px solid #c8141f;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, .6);
  padding: 18px 20px;
  font-family: 'Courier Prime', 'Inter', -apple-system, sans-serif;
  color: #f3efe9;
}

.st-consent[hidden],
.st-prefs[hidden],
.st-prefs-backdrop[hidden] { display: none; }

.st-consent__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.st-consent h2,
.st-prefs h2 {
  font-family: 'BlackBeast', 'Rubik Wet Paint', cursive;
  font-weight: 400;
  letter-spacing: .5px;
  text-transform: none;
  color: #ff2a35;
  margin: 0 0 6px;
  line-height: 1.2;
}

.st-consent h2 { font-size: 20px; }

.st-consent__copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #b6afa8;
}

.st-consent a,
.st-prefs a { color: #ffcf63; text-decoration: underline; }
.st-consent a:hover,
.st-prefs a:hover { color: #f3efe9; }

.st-consent__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.st-btn-consent {
  font-family: 'Courier Prime', 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  border-radius: 6px;
  border: 0;
  padding: 11px 22px;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transition: background .2s ease;
}

.st-btn-consent:focus-visible {
  outline: 2px solid #ffcf63;
  outline-offset: 2px;
}

.st-btn-consent--primary {
  background: #c8141f;
  color: #ffffff;
}

.st-btn-consent--primary:hover { background: #ff2a35; color: #ffffff; }

.st-btn-consent--link {
  background: none;
  color: #b6afa8;
  font-weight: 400;
  text-decoration: underline;
  padding: 11px 6px;
}

.st-btn-consent--link:hover { color: #f3efe9; }

/* Preferences modal */
.st-prefs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  z-index: 2147483001;
}

.st-prefs {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'Courier Prime', 'Inter', -apple-system, sans-serif;
  color: #f3efe9;
}

.st-prefs__box {
  background: #1d1818;
  border: 1px solid #c8141f;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .7);
}

.st-prefs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #332b2b;
}

.st-prefs__head h2 { font-size: 24px; margin: 0; }

.st-prefs__close {
  background: none;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #b6afa8;
  padding: 0 4px;
}

.st-prefs__close:hover { color: #f3efe9; }
.st-prefs__close:focus-visible { outline: 2px solid #ffcf63; outline-offset: 2px; }

.st-prefs__body {
  padding: 4px 20px;
  overflow-y: auto;
}

.st-prefs__group { padding: 16px 0; border-bottom: 1px solid #332b2b; }
.st-prefs__group:last-child { border-bottom: 0; }

.st-prefs__groupHead { display: flex; align-items: center; gap: 12px; }

/* MDB/Bootstrap restyle bare labels (small grey text) — pin ours back. */
.st-prefs label.st-prefs__title {
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #f3efe9;
  margin: 0;
  cursor: pointer;
}

.st-prefs__always {
  font-weight: 400;
  font-size: 11px;
  color: #b6afa8;
  margin-left: 4px;
}

.st-prefs__desc {
  margin: 6px 0 0 56px;
  font-size: 13px;
  line-height: 1.6;
  color: #b6afa8;
}

.st-prefs__foot {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #332b2b;
}

.st-prefs__foot .st-btn-consent { flex: 1; }

/* Toggle */
.st-prefs label.st-switch { position: relative; display: inline-block; flex-shrink: 0; margin: 0; }
.st-switch input {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
}

.st-switch__track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #332b2b;
  transition: background .15s ease;
  pointer-events: none;
}

.st-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f3efe9;
  transition: transform .15s ease;
}

.st-switch input:checked + .st-switch__track { background: #c8141f; }
.st-switch input:checked + .st-switch__track::after { transform: translateX(20px); }
.st-switch input:disabled + .st-switch__track { background: #6e0b12; }
.st-switch input:disabled { cursor: not-allowed; }
.st-switch input:focus-visible + .st-switch__track { outline: 2px solid #ffcf63; outline-offset: 2px; }

body.st-consent-locked { overflow: hidden; }

/* The banner is fixed to the bottom of the viewport. js/consent.js measures it
   and publishes --st-consent-height so the tail of the page and the sticky
   "Buy tickets" bar stay reachable rather than trapped behind it. Add a
   selector here if another bottom-anchored element is introduced. */
.st-consent-visible body {
  padding-bottom: var(--st-consent-height, 0px);
}

.st-consent-visible .sticky-bar {
  bottom: var(--st-consent-height, 0px);
}

@media (max-width: 767px) {
  .st-consent { padding: 14px; max-height: 80vh; overflow-y: auto; }
  .st-consent__inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .st-consent__actions { flex-direction: column; }
  .st-consent__actions .st-btn-consent { width: 100%; }
  .st-prefs__foot { flex-direction: column; }
  .st-prefs__desc { margin-left: 0; }
}
