/* OneSliders core stylesheet
   Loaded on every page via oneslider-core.css. Covers two site-wide bits:
     1. .os-brand   — clickable logo + wordmark injected into every top nav
     2. #os-cc-*    — geo-aware cookie consent banner */

:root {
  --os-navy: #0d2137;
  --os-ink: #101820;
  --os-muted: #62717c;
  --os-bg: #f5f8fa;
  --os-surface: #ffffff;
  --os-line: #dce6ea;
  --os-primary: #0d2137;
  --os-accent: #2f6f92;
  --os-accent-2: #3b8fb6;
  --os-soft: #edf5f8;

  --navy: var(--os-navy);
  --ink: var(--os-ink);
  --muted: var(--os-muted);
  --theme: var(--os-primary);
  --theme-2: var(--os-accent);
}

/* ---------------------------------------------------------------------
   Brand link in every nav
   --------------------------------------------------------------------- */
.os-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-right: 8px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .01em;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease, transform .08s ease;
}
.os-brand:hover,
.os-brand:focus-visible {
  background: rgba(13, 33, 55, .08);
  outline: none;
}
.os-brand:active { transform: translateY(1px); }
.os-brand__logo {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}
.os-brand__text {
  display: inline;
  line-height: 1;
}

/* Hide the wordmark on very small screens — keep just the logo */
@media (max-width: 420px) {
  .os-brand__text { display: none; }
  .os-brand { padding: 4px; }
}

/* When the nav uses a dark background (rare, but future-proof) */
nav.top-menu[data-theme="dark"] .os-brand:hover,
nav.event-nav[data-theme="dark"] .os-brand:hover {
  background: rgba(255, 255, 255, .12);
}

/* ---------------------------------------------------------------------
   iOS Human Interface Guidelines style mobile nav
   Shown only on screens <=620px. Above that, the page's own nav.top-menu
   or nav.event-nav is shown unchanged.
   --------------------------------------------------------------------- */
.ios-nav { display: none; }

@media (max-width: 620px) {
  /* Hide the desktop pill row + breadcrumbs on phones */
  nav.top-menu,
  nav.event-nav { display: none !important; }

  body.os-has-ios-nav:not(.event-page) {
    padding-top: calc(44px + env(safe-area-inset-top, 0px)) !important;
  }

  .ios-nav {
    position: fixed; top: 0; right: 0; left: 0; z-index: 2500;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    height: calc(44px + env(safe-area-inset-top, 0px));
    padding: 0 8px;
    padding-top:   env(safe-area-inset-top, 0px);
    padding-left:  calc(8px + env(safe-area-inset-left, 0px));
    padding-right: calc(8px + env(safe-area-inset-right, 0px));
    background: rgba(251, 250, 246, .96);
    border-bottom: 1px solid rgba(60, 60, 67, .14);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Arial, sans-serif;
  }

  .ios-back {
    display: inline-flex; align-items: center; gap: 2px;
    min-height: 44px; padding: 0 6px;
    color: var(--theme, var(--navy, #0d2137));
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    max-width: 38vw;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
  }
  .ios-back > span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .ios-back svg { width: 22px; height: 22px; margin-left: -4px; flex: 0 0 auto; }
  .ios-back:active { opacity: .55; }

  .ios-title {
    margin: 0;
    color: var(--ink, #17201c);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 56vw;
    text-align: center;
  }

  .ios-more {
    justify-self: end;
    display: inline-grid; place-items: center;
    width: 44px; height: 44px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    color: var(--theme, var(--navy, #0d2137));
    cursor: pointer;
    border-radius: 999px;
    -webkit-tap-highlight-color: transparent;
  }
  .ios-more:active { background: rgba(60, 60, 67, .12); }
  .ios-more svg { width: 22px; height: 22px; display: block; }
}

/* Sheet — overlay + slide-up panel. Lives in DOM at all times,
   visible only when .ios-sheet--open is set. */
.ios-sheet {
  display: none;
  position: fixed; inset: 0;
  z-index: 3000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Arial, sans-serif;
}
.ios-sheet--open { display: block; }
.ios-sheet[hidden] { display: none; }
.ios-sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .34);
  opacity: 0;
  animation: ios-fade .22s ease forwards;
}
.ios-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 86vh;
  overflow-y: auto;
  background: #f2f2f7;
  border-radius: 14px 14px 0 0;
  padding: 6px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  animation: ios-slide-up .28s cubic-bezier(.32, .72, 0, 1) forwards;
  -webkit-overflow-scrolling: touch;
}
@keyframes ios-fade     { to { opacity: 1; } }
@keyframes ios-slide-up { to { transform: translateY(0); } }
.ios-sheet__grabber {
  display: block;
  width: 36px; height: 5px;
  margin: 6px auto 14px;
  border-radius: 999px;
  background: rgba(60, 60, 67, .30);
}
.ios-sheet__group {
  display: block;
  margin: 0 0 16px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.ios-sheet__heading {
  margin: 18px 14px 6px;
  color: rgba(60, 60, 67, .60);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ios-sheet__heading:first-child { margin-top: 8px; }
.ios-sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--ink, #17201c);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(60, 60, 67, .10);
  font-size: 17px;
  font-weight: 400;
  font-family: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ios-sheet__item:last-child { border-bottom: 0; }
.ios-sheet__item:active { background: rgba(60, 60, 67, .06); }
.ios-sheet__item svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--theme, var(--navy, #0d2137)); }
.ios-sheet__chevron { margin-left: auto; color: rgba(60, 60, 67, .30); }
.ios-sheet__chevron svg { width: 14px; height: 14px; color: inherit; }
.ios-sheet__done {
  display: block;
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  background: #fff;
  border: 0;
  border-radius: 12px;
  color: var(--theme, var(--navy, #0d2137));
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ios-sheet__done:active { background: #ebebee; }
body.ios-sheet-open { overflow: hidden; }

/* ---------------------------------------------------------------------
   Standardised site footer (injected by siteFooter module)
   --------------------------------------------------------------------- */
.os-footer {
  margin-top: 24px;
  padding: 18px clamp(16px, 3vw, 32px);
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(18, 32, 46, .12);
  background: transparent;
  color: #5a6672;
  font: 13px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  text-align: center;
}
.os-footer p { margin: 0; }
.os-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .12s, color .12s;
}
.os-footer a:hover {
  color: #12202e;
  border-bottom-color: currentColor;
}

/* ---------------------------------------------------------------------
   Cookie consent banner
   --------------------------------------------------------------------- */
#os-cc-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483600;
  display: flex;
  justify-content: center;
  padding: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  padding-left:  calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(14px + env(safe-area-inset-right, 0px));
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#os-cc-root[hidden] { display: none; }

.os-cc-card {
  pointer-events: auto;
  width: min(960px, 100%);
  background: #0d2137;
  color: #f2f3f5;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 24px;
  align-items: center;
  font-size: 14.5px;
  line-height: 1.5;
}

.os-cc-card h2 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
}

.os-cc-card p {
  margin: 0;
  color: rgba(242,243,245,.85);
}

.os-cc-card a {
  color: #ffd166;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.os-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.os-cc-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #f2f3f5;
  padding: 9px 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
}

.os-cc-btn:hover { background: rgba(255,255,255,.06); }
.os-cc-btn:active { transform: translateY(1px); }
.os-cc-btn:focus-visible {
  outline: 2px solid #ffd166;
  outline-offset: 2px;
}

.os-cc-btn--primary {
  background: #ffd166;
  border-color: #ffd166;
  color: #0d2137;
}
.os-cc-btn--primary:hover {
  background: #ffdd8a;
  border-color: #ffdd8a;
}

.os-cc-btn--ghost {
  border-color: rgba(255,255,255,.22);
}

/* Customize panel */
.os-cc-options {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 4px;
}

.os-cc-card.is-customizing .os-cc-options { display: flex; }

.os-cc-option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}

.os-cc-option input[type="checkbox"] {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  accent-color: #ffd166;
}

.os-cc-option input[type="checkbox"]:disabled {
  accent-color: #5a6672;
  cursor: not-allowed;
}

.os-cc-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.os-cc-option-text strong {
  font-weight: 600;
  font-size: 14px;
}

.os-cc-option-text span {
  color: rgba(242,243,245,.7);
  font-size: 13px;
}

.os-cc-options-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Top-nav cookie button, injected next to the language menu.
   Styled to match the .event-language-menu summary pill exactly so it
   blends visually with the existing nav controls. */
#os-cc-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 6px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(18,32,46,.11);
  background: #fff;
  color: #5a6672;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}
#os-cc-nav:hover,
#os-cc-nav:focus-visible {
  background: #0d2137;
  border-color: #0d2137;
  color: #fff;
  outline: none;
}
#os-cc-nav svg {
  width: 17px;
  height: 17px;
  display: block;
}

/* Floating reopen link, injected only as a last-resort fallback
   on pages without a top-nav language menu and without a footer. */
#os-cc-reopen {
  position: fixed;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483500;
  background: rgba(13,33,55,.86);
  color: #f2f3f5;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 7px 12px;
  font: 500 12.5px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  opacity: .85;
  transition: opacity .15s, transform .12s;
}
#os-cc-reopen:hover { opacity: 1; transform: translateY(-1px); }
#os-cc-reopen[hidden] { display: none; }

/* Mobile: stack everything */
@media (max-width: 640px) {
  #os-cc-root {
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding-left:  calc(10px + env(safe-area-inset-left, 0px));
    padding-right: calc(10px + env(safe-area-inset-right, 0px));
  }
  .os-cc-card {
    grid-template-columns: 1fr;
    padding: 16px;
    font-size: 14px;
    border-radius: 12px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .os-cc-actions {
    justify-content: stretch;
  }
  .os-cc-btn {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
    padding: 11px 10px;
  }
  .os-cc-btn--primary { flex: 1 1 100%; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .os-cc-btn, #os-cc-reopen { transition: none; }
}
