/* Cookie Consent – banner, settings dialog, and re-open link */

/* ── Overlay ────────────────────────────────────────────── */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.cc-overlay.cc-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Banner ─────────────────────────────────────────────── */
.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
  padding: 1.25rem 1rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.cc-banner.cc-visible {
  transform: translateY(0);
}
.cc-banner-inner {
  max-width: 960px;
  margin: 0 auto;
}
.cc-banner-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111827;
}
.cc-banner-text {
  font-size: 0.875rem;
  color: #6B7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.cc-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Shared button base ─────────────────────────────────── */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.cc-btn:focus-visible {
  outline: 2px solid #B08E67;
  outline-offset: 2px;
}

/* Accept */
.cc-btn-accept {
  background: #CDAD86;
  color: #111827;
}
.cc-btn-accept:hover {
  background: #B08E67;
}

/* Reject / secondary */
.cc-btn-reject {
  background: #F3F4F6;
  color: #111827;
}
.cc-btn-reject:hover {
  background: #E5E7EB;
}

/* Settings / tertiary */
.cc-btn-settings {
  background: transparent;
  color: #6B7280;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.cc-btn-settings:hover {
  color: #111827;
}

/* ── Settings dialog ────────────────────────────────────── */
.cc-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10000;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  width: 92vw;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cc-dialog.cc-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.cc-dialog-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

/* Category rows */
.cc-category {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
}
.cc-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cc-category-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
}
.cc-category-desc {
  font-size: 0.8rem;
  color: #6B7280;
  margin-top: 0.35rem;
  line-height: 1.5;
}
.cc-category-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #16A34A;
  background: #F0FDF4;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cc-toggle-track {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.cc-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cc-toggle input:checked + .cc-toggle-track {
  background: #CDAD86;
}
.cc-toggle input:checked + .cc-toggle-track::after {
  transform: translateX(18px);
}
.cc-toggle input:focus-visible + .cc-toggle-track {
  outline: 2px solid #B08E67;
  outline-offset: 2px;
}

/* Dialog buttons */
.cc-dialog-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.cc-dialog-buttons .cc-btn {
  flex: 1;
}

/* ── Mobile tweaks ──────────────────────────────────────── */
@media (max-width: 480px) {
  .cc-banner-buttons {
    flex-direction: column;
  }
  .cc-btn {
    width: 100%;
  }
  .cc-dialog-buttons {
    flex-direction: column;
  }
}
