/* ===== Cookie Consent Banner & Preferences Panel ===== */

/* Overlay */
.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s 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;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cc-banner.cc-visible {
  transform: translateY(0);
}

.cc-banner__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.cc-banner__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.5rem;
}

.cc-banner__text {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.cc-banner__text a {
  color: #1a5d2a;
  text-decoration: underline;
}

.cc-banner__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cc-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.cc-btn:active {
  transform: scale(0.97);
}

.cc-btn--accept {
  background: #1a5d2a;
  color: #fff;
}
.cc-btn--accept:hover {
  background: #15491f;
}

.cc-btn--reject {
  background: #e0e0e0;
  color: #333;
}
.cc-btn--reject:hover {
  background: #ccc;
}

.cc-btn--manage {
  background: transparent;
  color: #1a5d2a;
  border: 2px solid #1a5d2a;
}
.cc-btn--manage:hover {
  background: #f0f7f2;
}

/* Preferences Panel */
.cc-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 10000;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  max-width: 520px;
  width: calc(100% - 2rem);
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cc-panel.cc-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.cc-panel__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.5rem;
}

.cc-panel__text {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.cc-panel__text a {
  color: #1a5d2a;
  text-decoration: underline;
}

/* Category */
.cc-category {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.cc-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cc-category__name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
}

.cc-category__desc {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  transition: background 0.3s;
}
.cc-toggle__slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
.cc-toggle input:checked + .cc-toggle__slider {
  background: #1a5d2a;
}
.cc-toggle input:checked + .cc-toggle__slider::before {
  transform: translateX(22px);
}
.cc-toggle input:disabled + .cc-toggle__slider {
  background: #1a5d2a;
  opacity: 0.6;
  cursor: not-allowed;
}

.cc-category__badge {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1a5d2a;
  background: #e8f5e9;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Panel buttons */
.cc-panel__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Close button */
.cc-panel__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 0.25rem;
}
.cc-panel__close:hover {
  color: #333;
}

/* Responsive */
@media (max-width: 600px) {
  .cc-banner {
    padding: 1rem;
  }
  .cc-banner__buttons {
    flex-direction: column;
  }
  .cc-btn {
    width: 100%;
    text-align: center;
  }
  .cc-panel {
    padding: 1.25rem;
  }
}
