/* GBFF cookie consent — banner + preferences.
   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. */

.gbff-consent {
  position: fixed;
  z-index: 2147483000; /* above the sticky navbar and MDB modals */
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gbff-white, #fff);
  border-top: 3px solid var(--gbff-red, #FF5142);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
  padding: 18px 20px;
}

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

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

.gbff-consent__copy h2 {
  font-size: 16px;
  margin: 0 0 4px;
  color: var(--gbff-blue, #00517C);
  font-weight: 700;
}

.gbff-consent__copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
}

.gbff-consent__copy a { color: var(--gbff-blue, #00517C); text-decoration: underline; }

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

.gbff-btn-consent {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 24px;
  border: 2px solid transparent;
  padding: 9px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s ease;
}

.gbff-btn-consent:hover { opacity: .85; }

.gbff-btn-consent:focus-visible {
  outline: 3px solid var(--gbff-blue, #00517C);
  outline-offset: 2px;
}

.gbff-btn-consent--primary {
  background: var(--gbff-red, #FF5142);
  color: #fff;
}

.gbff-btn-consent--link {
  background: none;
  color: var(--gbff-blue, #00517C);
  text-decoration: underline;
  padding: 9px 6px;
}

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

.gbff-prefs {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gbff-prefs__box {
  background: var(--gbff-white, #fff);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.gbff-prefs__head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--gbff-blue, #00517C);
  font-weight: 700;
}

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

.gbff-prefs__body {
  padding: 8px 20px;
  overflow-y: auto;
}

.gbff-prefs__group { padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.gbff-prefs__group:last-child { border-bottom: 0; }

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

.gbff-prefs__title {
  font-weight: 700;
  font-size: 14px;
  color: #222;
  margin: 0;
  cursor: pointer;
}

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

.gbff-prefs__desc {
  margin: 6px 0 0 56px;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

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

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

/* Toggle */
.gbff-switch { position: relative; display: inline-block; flex-shrink: 0; margin: 0; }
.gbff-switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }

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

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

.gbff-switch input:checked + .gbff-switch__track { background: var(--gbff-red, #FF5142); }
.gbff-switch input:checked + .gbff-switch__track::after { transform: translateX(20px); }
.gbff-switch input:disabled + .gbff-switch__track { background: #b5cdd9; }
.gbff-switch input:focus-visible + .gbff-switch__track { outline: 3px solid var(--gbff-blue, #00517C); outline-offset: 2px; }

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

/* The banner is fixed to the bottom of the viewport, so anything else anchored
   there ends up underneath it. Most importantly that's .tp-sticky-bar on the
   checkout (ticket-preview.php), which holds the running total and the CONTINUE
   TO CHECKOUT button — on mobile the banner covers it completely.
   js/consent.js measures the banner and publishes --gbff-consent-height, so
   bottom-anchored UI can clear it while it's on screen. Add a selector here if
   another sticky footer is introduced elsewhere. */
.gbff-consent-visible .tp-sticky-bar {
  bottom: var(--gbff-consent-height, 0px);
}

/* Keep the tail of the page reachable rather than trapped behind the banner. */
.gbff-consent-visible body {
  padding-bottom: var(--gbff-consent-height, 0px);
}

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