/* CountdownHub UK — sitewide footer, privacy panel and mobile safeguards */

*, *::before, *::after { box-sizing: border-box; }

/* ---------- Normal website footer ---------- */
.ch-site-footer {
  position: relative !important;
  z-index: 60 !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  float: none !important;
  clear: both !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 22px 18px max(22px, env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 0 !important;
  background: rgba(5,10,18,.98) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: rgba(255,255,255,.54) !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 10px !important;
  line-height: 1.55 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.ch-site-footer__inner {
  width: min(1080px, 100%) !important;
  margin: 0 auto !important;
}

.ch-site-footer__identity {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 5px 9px !important;
  margin: 0 0 8px !important;
  color: rgba(255,255,255,.82) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
}

.ch-site-footer__identity a,
.ch-site-footer__links a,
.ch-site-footer__links button {
  color: inherit !important;
  text-decoration: none !important;
}

.ch-site-footer__legal,
.ch-site-footer__disclaimer {
  width: min(980px, 100%) !important;
  margin: 0 auto !important;
}

.ch-site-footer__legal { color: rgba(255,255,255,.48) !important; }
.ch-site-footer__disclaimer { margin-top: 5px !important; color: rgba(255,255,255,.40) !important; }

.ch-site-footer__links {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 5px 9px !important;
  margin-top: 9px !important;
}

.ch-site-footer__links a,
.ch-site-footer__links button {
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: rgba(255,255,255,.70) !important;
  font: inherit !important;
  cursor: pointer !important;
}

.ch-site-footer__links a:hover,
.ch-site-footer__links button:hover,
.ch-site-footer__identity a:hover { color: #fff !important; }

.ch-footer-dot { opacity: .34 !important; }

/*
 * 22 of the original countdown designs are intentionally a fixed full-screen
 * composition on desktop. Their old footer was fixed to the viewport too.
 * The spacer gives those designs one normal document viewport, then the new
 * footer follows underneath. The footer itself is never fixed/sticky/absolute.
 */
html.ch-footer-screen-page,
body.ch-footer-screen-page {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.ch-footer-screen-page { --footer-h: 0px; }

.ch-footer-viewport-spacer {
  display: block;
  width: 1px;
  height: 100vh;
  height: 100dvh;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Cookie / privacy panel ---------- */
#ch-cookie-panel {
  position: fixed;
  z-index: 2147483646;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(660px, calc(100vw - 24px));
  padding: 18px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(8,14,26,.97);
  color: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#ch-cookie-panel[hidden] { display: none !important; }
.ch-cookie-heading { margin: 0 0 7px; font-size: 17px; font-weight: 750; }
.ch-cookie-copy { margin: 0; color: rgba(255,255,255,.66); font-size: 12.5px; line-height: 1.55; }
.ch-cookie-copy a { color: #fff; }
.ch-cookie-options { display: grid; gap: 9px; margin-top: 14px; }
.ch-cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.035); }
.ch-cookie-option-title { font-size: 12px; font-weight: 700; }
.ch-cookie-option-copy { margin-top: 2px; color: rgba(255,255,255,.48); font-size: 11px; }
.ch-cookie-status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.68); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.ch-cookie-status.active { background: rgba(82,211,145,.12); color: #9ce8bd; }
.ch-cookie-actions { display: flex; justify-content: flex-end; margin-top: 15px; }
.ch-cookie-actions button { min-height: 39px; padding: 0 15px; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; background: rgba(255,255,255,.055); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
#ch-cookie-save { background: #fff; color: #0a1020; }

/* ---------- Mobile header collision safeguards ---------- */
@media (max-width: 780px) {
  html, body { max-width: 100% !important; overflow-x: hidden !important; }
  .topbar, .site-header, .page-header, .event-header, header { max-width: 100% !important; }
  .topbar-inner, .header-inner, .site-header-inner { width: 100% !important; max-width: 100% !important; min-width: 0 !important; padding-left: max(9px, env(safe-area-inset-left)) !important; padding-right: max(9px, env(safe-area-inset-right)) !important; }
  .topbar-actions, .header-actions, .nav-actions, .header-nav { display: flex !important; align-items: center !important; justify-content: flex-end !important; flex-wrap: wrap !important; gap: 5px !important; max-width: 100% !important; min-width: 0 !important; }
  .topbar-actions > *, .header-actions > *, .nav-actions > *, .header-nav > * { flex: 0 1 auto !important; min-width: 0 !important; }
  .topbar-pill, .header-pill, .nav-pill, #ch-tools-toggle, .header-nav > a, .event-date-pill { max-width: 145px !important; min-width: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .topbar-brand, .site-brand, .header-brand, header .brand { min-width: 0 !important; max-width: calc(100vw - 175px) !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  .ch-site-footer { padding: 18px 13px max(18px, env(safe-area-inset-bottom)) !important; font-size: 9px !important; }
  .ch-site-footer__identity { font-size: 10px !important; }
  #ch-cookie-panel { bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100vw - 16px); padding: 15px; }
  .ch-cookie-actions, .ch-cookie-actions button { width: 100%; }
}

@media (max-width: 650px) {
  /* The fixed-design templates switch to normal-flow content at this breakpoint. */
  .ch-footer-viewport-spacer { display: none !important; }
  #header-date, .header-date, .topbar-date, .event-date-pill { display: none !important; }
  .topbar-pill, .header-pill, .nav-pill, #ch-tools-toggle, .header-nav > a { height: 30px !important; padding: 0 8px !important; font-size: 10px !important; }
}

@media (max-width: 360px) {
  .topbar-inner, .header-inner, .site-header-inner, .site-header { flex-wrap: wrap !important; }
  .topbar-actions, .header-actions, .nav-actions, .header-nav { width: 100% !important; justify-content: flex-end !important; }
  .topbar-brand, .site-brand, .header-brand, header .brand { max-width: 100% !important; }
}
