/* Yat Cookie Consent — Monaco Pearl (Yatching Tour) */

:root {
  --yat-cc-bg: #fdfdfd;
  --yat-cc-fg: #131a21;
  --yat-cc-muted: #59636e;
  --yat-cc-accent: #14425c;
  --yat-cc-accent-hover: #0e3145;
  --yat-cc-accent-fg: #fdfdfd;
  --yat-cc-border: #e2e6ea;
  --yat-cc-radius: 9999px;
  --yat-cc-shadow: 0 -10px 40px rgba(19, 26, 33, 0.1);
  --yat-cc-font: "Outfit", system-ui, -apple-system, sans-serif;
}

.yat-cc {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 999990;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--yat-cc-bg);
  color: var(--yat-cc-fg);
  font-family: var(--yat-cc-font);
  box-shadow: var(--yat-cc-shadow);
  border-top: 1px solid var(--yat-cc-border);
}

.yat-cc--bottom {
  bottom: 0;
}

.yat-cc--top {
  top: 0;
  border-top: 0;
  border-bottom: 1px solid var(--yat-cc-border);
  box-shadow: 0 10px 40px rgba(19, 26, 33, 0.1);
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.yat-cc[hidden] {
  display: none !important;
}

.yat-cc__panel {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
}

.yat-cc__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.yat-cc__message {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--yat-cc-muted);
  max-width: 65ch;
}

.yat-cc__privacy {
  color: var(--yat-cc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
}

.yat-cc__privacy:hover,
.yat-cc__privacy:focus-visible {
  color: var(--yat-cc-accent-hover);
}

.yat-cc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.yat-cc__btn {
  appearance: none;
  border: 1px solid var(--yat-cc-border);
  background: transparent;
  color: var(--yat-cc-fg);
  border-radius: var(--yat-cc-radius);
  padding: 11px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  min-height: 44px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.yat-cc__btn:hover,
.yat-cc__btn:focus-visible {
  outline: none;
  background: #eef1f3;
}

.yat-cc__btn:active {
  transform: scale(0.98);
}

.yat-cc__btn--prefs {
  background: transparent;
  border-color: var(--yat-cc-border);
  color: var(--yat-cc-muted);
}

.yat-cc__btn--prefs:hover,
.yat-cc__btn--prefs:focus-visible {
  border-color: var(--yat-cc-muted);
  color: var(--yat-cc-fg);
  background: #eef1f3;
}

.yat-cc__btn--deny {
  background: transparent;
  border-color: var(--yat-cc-accent);
  color: var(--yat-cc-accent);
}

.yat-cc__btn--deny:hover,
.yat-cc__btn--deny:focus-visible {
  background: #e7edf1;
}

.yat-cc__btn--accept {
  background: var(--yat-cc-accent);
  border-color: var(--yat-cc-accent);
  color: var(--yat-cc-accent-fg);
}

.yat-cc__btn--accept:hover,
.yat-cc__btn--accept:focus-visible {
  background: var(--yat-cc-accent-hover);
  border-color: var(--yat-cc-accent-hover);
  color: var(--yat-cc-accent-fg);
}

.yat-cc__btn--save {
  margin-top: 4px;
  justify-self: start;
}

.yat-cc__prefs {
  max-width: 72rem;
  margin: 16px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--yat-cc-border);
  display: grid;
  gap: 12px;
}

.yat-cc__prefs[hidden] {
  display: none !important;
}

.yat-cc__prefs-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.yat-cc__cat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px solid var(--yat-cc-border);
}

.yat-cc__cat:last-of-type {
  border-bottom: 0;
}

.yat-cc__cat--locked {
  cursor: default;
}

.yat-cc__cat-text {
  flex: 1;
  min-width: 0;
}

.yat-cc__cat strong {
  display: block;
  color: var(--yat-cc-fg);
  margin-bottom: 4px;
  font-weight: 600;
}

.yat-cc__cat small {
  display: block;
  color: var(--yat-cc-muted);
  line-height: 1.45;
}

.yat-cc__state {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--yat-cc-accent);
  white-space: nowrap;
  padding-top: 2px;
}

.yat-cc__switch {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 72px;
}

.yat-cc__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.yat-cc__slider {
  width: 44px;
  height: 24px;
  background: #c5cbd3;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.yat-cc__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(19, 26, 33, 0.2);
  transition: transform 0.2s ease;
}

.yat-cc__switch input:checked + .yat-cc__slider {
  background: var(--yat-cc-accent);
}

.yat-cc__switch input:checked + .yat-cc__slider::after {
  transform: translateX(20px);
}

.yat-cc__switch input:focus-visible + .yat-cc__slider {
  outline: 2px solid var(--yat-cc-accent);
  outline-offset: 2px;
}

.yat-cc__switch-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--yat-cc-muted);
  text-align: center;
}

@media (max-width: 720px) {
  /* Compact on phones: shorter banner so the hero stays visible. */
  .yat-cc {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .yat-cc__panel {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .yat-cc__title {
    margin-bottom: 4px;
    font-size: 0.9375rem;
  }

  .yat-cc__message {
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .yat-cc__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .yat-cc__btn {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
  }

  .yat-cc__btn--prefs {
    grid-column: 1 / -1;
    order: 3;
    min-height: 36px;
    border: 0;
    background: transparent;
    padding: 6px 0 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
  }

  .yat-cc__cat {
    flex-direction: column;
    gap: 10px;
  }

  .yat-cc__switch {
    align-self: flex-start;
    flex-direction: row;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yat-cc__btn,
  .yat-cc__slider,
  .yat-cc__slider::after {
    transition: none;
  }
}
