/* Cookie consent banner + settings modal. Loads after style.css. */

.cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-md, 12px);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cc-banner__text {
  flex: 1 1 320px;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.cc-banner__text a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid transparent;
}

.cc-btn--primary {
  background: var(--yellow);
  color: var(--black);
}

.cc-btn--secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.cc-btn--link {
  background: transparent;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
  border: 0;
  padding: 10px 6px;
}

.cc-btn:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* --- Settings modal --- */

.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cc-modal {
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-md, 12px);
  width: min(560px, 100%);
  max-height: min(640px, 90vh);
  overflow-y: auto;
  padding: 28px 28px 24px;
}

.cc-modal h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cc-modal > p {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.72);
}

.cc-modal > p a {
  color: var(--black);
  text-decoration: underline;
}

.cc-cat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cc-cat__info h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.cc-cat__info p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.65);
}

.cc-cat__always {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  padding-top: 4px;
}

/* Toggle */

.cc-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
}

.cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cc-toggle__track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #c9c6bd;
  transition: background 0.15s ease;
  pointer-events: none;
}

.cc-toggle__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.15s ease;
}

.cc-toggle input:checked + .cc-toggle__track {
  background: var(--black);
}

.cc-toggle input:checked + .cc-toggle__track::after {
  transform: translateX(20px);
  background: var(--yellow);
}

.cc-toggle input:focus-visible + .cc-toggle__track {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

.cc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cc-modal__actions .cc-btn--secondary {
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.35);
}

.cc-gpc-note {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.55);
}

@media (max-width: 600px) {
  .cc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px 18px;
  }

  .cc-banner__actions {
    width: 100%;
  }

  .cc-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-toggle__track,
  .cc-toggle__track::after {
    transition: none;
  }
}
