/* ============================================
   COOKIE CONSENT — Banner + Settings Panel
   ============================================ */

/* --- BANNER (bottom of screen) --- */
.cb-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: #111;
  color: #e0dcd6;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-banner.cb-hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.cb-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cb-banner-text {
  flex: 1 1 400px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.cb-banner-text a {
  color: #ecd32d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cb-banner-text a:hover {
  color: #f5e24e;
}

.cb-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* --- BUTTONS --- */
.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.cb-btn:focus-visible {
  outline: 2px solid #ecd32d;
  outline-offset: 2px;
}

.cb-btn--accept {
  background: #ecd32d;
  color: #111;
}

.cb-btn--accept:hover {
  background: #f5e24e;
  box-shadow: 0 2px 12px rgba(236, 211, 45, 0.3);
}

.cb-btn--reject {
  background: rgba(255, 255, 255, 0.1);
  color: #e0dcd6;
}

.cb-btn--reject:hover {
  background: rgba(255, 255, 255, 0.18);
}

.cb-btn--settings {
  background: transparent;
  color: #e0dcd6;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.6rem 0.6rem;
}

.cb-btn--settings:hover {
  color: #ecd32d;
}

/* --- OVERLAY --- */
.cb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.cb-overlay.cb-visible {
  opacity: 1;
  visibility: visible;
}

/* --- SETTINGS PANEL (modal) --- */
.cb-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 10000;
  background: #faf7ee;
  color: #111;
  border-radius: 14px;
  width: min(94vw, 520px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-panel.cb-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.cb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0.75rem;
}

.cb-panel-title {
  font-family: 'Playfair Display', 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
}

.cb-panel-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.cb-panel-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.cb-panel-close:focus-visible {
  outline: 2px solid #ecd32d;
  outline-offset: 2px;
}

.cb-panel-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.cb-panel-body {
  padding: 0.5rem 1.5rem 1.5rem;
}

.cb-panel-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #4a4a48;
  margin-bottom: 1.25rem;
}

.cb-panel-desc a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- CATEGORY ROW --- */
.cb-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cb-category:last-of-type {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 1.25rem;
}

.cb-cat-info {
  flex: 1;
}

.cb-cat-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111;
  margin-bottom: 0.2rem;
}

.cb-cat-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #7a7a76;
}

.cb-cat-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a7a76;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.3rem;
}

/* --- TOGGLE SWITCH --- */
.cb-toggle {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 26px;
  margin-top: 0.15rem;
}

.cb-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

.cb-toggle-track {
  position: absolute;
  inset: 0;
  background: #ccc8bc;
  border-radius: 13px;
  transition: background 0.25s;
}

.cb-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-toggle input:checked + .cb-toggle-track {
  background: #27ae60;
}

.cb-toggle input:checked + .cb-toggle-track::after {
  transform: translateX(22px);
}

.cb-toggle input:focus-visible + .cb-toggle-track {
  outline: 2px solid #ecd32d;
  outline-offset: 2px;
}

/* --- PANEL SAVE BUTTON --- */
.cb-panel-save {
  width: 100%;
}

.cb-btn--save {
  background: #111;
  color: #faf7ee;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.cb-btn--save:hover {
  background: #222;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .cb-banner {
    padding: 1rem;
  }

  .cb-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cb-banner-actions {
    flex-direction: column;
  }

  .cb-btn--settings {
    text-align: center;
  }

  .cb-panel {
    width: 96vw;
    max-height: 90vh;
    border-radius: 12px;
  }

  .cb-panel-header {
    padding: 1.25rem 1.25rem 0.5rem;
  }

  .cb-panel-body {
    padding: 0.5rem 1.25rem 1.25rem;
  }
}
