/* ============================================================
   GDPR Cookie Consent — cookie-consent.css
   ============================================================ */

/* ---- Banner ---- */
#cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #1a1a2e;
  color: #e0e0e0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  padding: 18px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  animation: cc-slide-up 0.3s ease;
}

@keyframes cc-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

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

.cc-banner-text {
  flex: 1 1 300px;
}

.cc-banner-text p {
  margin: 0;
}

.cc-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ---- Preferences Modal ---- */
#cc-preferences {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

.cc-preferences-dialog {
  background: #ffffff;
  color: #1a1a2e;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: cc-fade-in 0.25s ease;
}

@keyframes cc-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.cc-pref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e8f0;
}

.cc-pref-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

.cc-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #6b6b8a;
  padding: 0 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.cc-close:hover,
.cc-close:focus-visible {
  color: #1a1a2e;
  background: #f0f0f8;
  outline: 2px solid #4a4aff;
  outline-offset: 2px;
}

.cc-pref-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.cc-pref-body > p {
  margin: 0 0 20px;
  color: #555570;
  line-height: 1.6;
}

.cc-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-category {
  border: 1px solid #e8e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f9f9fc;
}

.cc-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cc-category-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cc-category-label {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 14px;
}

.cc-badge {
  font-size: 11px;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: 500;
}

.cc-category-desc {
  margin: 0;
  color: #6b6b8a;
  font-size: 13px;
  line-height: 1.5;
}

/* ---- Toggle Switch ---- */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-slider {
  position: absolute;
  inset: 0;
  background: #c8c8dc;
  border-radius: 24px;
  transition: background 0.25s;
}

.cc-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cc-toggle input:checked + .cc-slider {
  background: #4a4aff;
}

.cc-toggle input:checked + .cc-slider::before {
  transform: translateX(20px);
}

.cc-toggle input:disabled + .cc-slider {
  background: #4caf50;
  opacity: 0.8;
  cursor: not-allowed;
}

.cc-toggle input:focus-visible + .cc-slider {
  outline: 2px solid #4a4aff;
  outline-offset: 2px;
}

.cc-pref-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e8e8f0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---- Buttons ---- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  line-height: 1.4;
}

.cc-btn:focus-visible {
  outline: 2px solid #4a4aff;
  outline-offset: 2px;
}

.cc-btn-primary {
  background: #4a4aff;
  color: #ffffff;
  border-color: #4a4aff;
}

.cc-btn-primary:hover {
  background: #3333dd;
  border-color: #3333dd;
}

.cc-btn-secondary {
  background: transparent;
  color: #e0e0e0;
  border-color: #6b6b8a;
}

.cc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #9999bb;
}

/* Secondary in light context (preferences footer) */
.cc-preferences-dialog .cc-btn-secondary {
  color: #555570;
  border-color: #c8c8dc;
}

.cc-preferences-dialog .cc-btn-secondary:hover {
  background: #f0f0f8;
  border-color: #9999bb;
  color: #1a1a2e;
}

.cc-btn-outline {
  background: transparent;
  color: #b0b0d0;
  border-color: #4a4a7a;
}

.cc-btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #8888bb;
  color: #e0e0e0;
}

/* ---- Link ---- */
.cc-link {
  color: #9090ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-link:hover {
  color: #c0c0ff;
}

/* ---- Floating Action Button ---- */
#cc-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1a1a2e;
  color: #9090ff;
  border: 2px solid #4a4a7a;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  font-family: inherit;
}

#cc-fab:hover {
  background: #2a2a4e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

#cc-fab:focus-visible {
  outline: 2px solid #4a4aff;
  outline-offset: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .cc-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .cc-banner-actions {
    justify-content: flex-end;
  }

  .cc-pref-footer {
    flex-direction: column-reverse;
  }

  .cc-pref-footer .cc-btn {
    width: 100%;
  }
}
