/* Cookie consent, map placeholder, privacy notices and third-party link notices */

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1000;
  background: var(--seed-bg);
  border-top: 1px solid var(--seed-border);
  box-shadow: var(--seed-shadow-md);
  padding: var(--seed-space-md);
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner[hidden] {
  display: block;
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner__inner {
  width: 100%;
  max-width: var(--seed-max-width);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--seed-space-sm);
}

.cookie-banner__text {
  margin: 0;
  color: var(--seed-fg);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cookie-banner__text strong {
  color: var(--seed-fg);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--seed-space-xs);
  align-items: center;
}

.cookie-banner__actions .btn {
  flex: 1 1 auto;
  min-width: 8rem;
}

@media (min-width: 48rem) {
  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-banner__text {
    max-width: 52ch;
  }

  .cookie-banner__actions {
    flex: 0 0 auto;
  }

  .cookie-banner__actions .btn {
    flex: 0 0 auto;
  }
}

/* ---------- Cookie preferences modal ---------- */
.cookie-modal[hidden] {
  display: none;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--seed-fg) 55%, transparent);
}

.cookie-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 38rem;
  max-height: 90vh;
  margin: auto var(--seed-space-md) var(--seed-space-md);
  background: var(--seed-bg);
  border-radius: var(--seed-radius);
  box-shadow: var(--seed-shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cookie-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--seed-space-sm);
  padding: var(--seed-space-md);
  border-bottom: 1px solid var(--seed-border);
}

.cookie-modal__header h2 {
  font-family: var(--seed-font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0;
}

.cookie-modal__header p {
  margin: var(--seed-space-xs) 0 0;
  color: var(--seed-muted);
  font-size: 0.9375rem;
}

.cookie-modal__close {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--seed-surface);
  color: var(--seed-fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.cookie-modal__close:hover {
  background: var(--seed-border);
}

.cookie-modal__close:focus-visible {
  outline: 2px solid var(--seed-primary);
  outline-offset: 2px;
}

.cookie-modal__body {
  padding: var(--seed-space-md);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--seed-space-sm);
}

.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--seed-space-sm);
  padding: var(--seed-space-sm);
  background: var(--seed-surface);
  border-radius: var(--seed-radius);
}

.cookie-category__text {
  flex: 1;
}

.cookie-category__text h3 {
  margin: 0 0 0.125rem;
  font-size: 1rem;
  font-weight: 700;
}

.cookie-category__text p {
  margin: 0;
  color: var(--seed-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.cookie-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__switch {
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--seed-border);
  position: relative;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.cookie-toggle__switch::after {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--seed-bg);
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--seed-fg) 18%, transparent);
}

.cookie-toggle input:checked + .cookie-toggle__switch {
  background: var(--seed-primary);
}

.cookie-toggle input:checked + .cookie-toggle__switch::after {
  transform: translateX(1.25rem);
}

.cookie-toggle input:focus-visible + .cookie-toggle__switch {
  outline: 2px solid var(--seed-primary);
  outline-offset: 2px;
}

.cookie-toggle input:disabled + .cookie-toggle__switch {
  opacity: 0.6;
}

.cookie-toggle__label {
  font-size: 0.875rem;
  font-weight: 600;
}

.cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--seed-space-xs);
  padding: var(--seed-space-md);
  border-top: 1px solid var(--seed-border);
  background: var(--seed-surface);
}

.cookie-modal__footer .btn {
  flex: 1 1 auto;
}

@media (min-width: 40rem) {
  .cookie-modal {
    align-items: center;
    padding: var(--seed-space-md);
  }

  .cookie-modal__dialog {
    margin: auto;
  }

  .cookie-modal__footer .btn {
    flex: 0 0 auto;
  }
}

/* ---------- Map placeholder ---------- */
.map-placeholder {
  width: 100%;
  min-height: 220px;
  background: var(--seed-surface);
  border: 1px solid var(--seed-border);
  border-radius: var(--seed-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--seed-space-md);
}

.map-placeholder__content {
  max-width: 32ch;
}

.map-placeholder__content p {
  margin: 0 0 var(--seed-space-xs);
  color: var(--seed-fg);
  font-size: 0.9375rem;
}

.map-placeholder__content p + p {
  margin-top: var(--seed-space-xs);
}

.map-placeholder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--seed-space-xs);
  justify-content: center;
  margin-top: var(--seed-space-sm);
}

.map-placeholder iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--seed-radius);
}

/* ---------- Contact form privacy notice ---------- */
.form-privacy-notice {
  margin-top: var(--seed-space-sm);
  padding: var(--seed-space-sm);
  background: var(--seed-surface);
  border: 1px solid var(--seed-border);
  border-radius: var(--seed-radius);
  font-size: 0.875rem;
  color: var(--seed-muted);
  line-height: 1.5;
}

.form-privacy-notice p {
  margin: 0;
}

.form-privacy-notice a {
  font-weight: 600;
}

/* ---------- Third-party link notice ---------- */
.third-party-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--seed-space-xs);
  padding: var(--seed-space-sm);
  background: var(--seed-surface);
  border: 1px solid var(--seed-border);
  border-radius: var(--seed-radius);
  font-size: 0.875rem;
  color: var(--seed-muted);
  line-height: 1.5;
}

.third-party-notice svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--seed-primary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.third-party-notice p {
  margin: 0;
}

.third-party-notice a {
  font-weight: 600;
}

/* ---------- Placeholder highlight for club-supplied values ---------- */
.placeholder {
  display: inline-block;
  background: color-mix(in srgb, var(--seed-primary) 12%, transparent);
  color: var(--seed-primary-dark);
  padding: 0 0.25rem;
  border-radius: 0.25rem;
  font-weight: 600;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-modal__dialog,
  .cookie-toggle__switch,
  .cookie-toggle__switch::after {
    transition: none;
  }
}
