/* ============================================
   COOKIE CONSENT BANNER & MODAL
   ============================================ */

:root {
  --cc-bg: #0A0A0A;
  --cc-text: #FFFFFF;
  --cc-text-secondary: #A0A0A0;
  --cc-border: rgba(255, 255, 255, 0.12);
  --cc-overlay: rgba(0, 0, 0, 0.6);
  --cc-radius: 12px;
}

.cc-banner,
.cc-modal-overlay {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cc-text);
}

.cc-banner *,
.cc-modal-overlay * {
  box-sizing: border-box;
}

/* --- Banner --- */
.cc-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 9998;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.cc-banner.cc-visible {
  opacity: 1;
  transform: translateY(0);
}

.cc-banner-inner {
  padding: 20px;
}

@media (min-width: 640px) {
  .cc-banner {
    left: 50%;
    right: auto;
    bottom: 24px;
    max-width: 560px;
    width: calc(100% - 32px);
    transform: translateX(-50%) translateY(8px);
  }
  .cc-banner.cc-visible {
    transform: translateX(-50%) translateY(0);
  }
  .cc-banner-inner {
    padding: 24px;
  }
}

.cc-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--cc-text);
  letter-spacing: -0.01em;
}

.cc-body {
  font-size: 13px;
  color: var(--cc-text-secondary);
  margin: 0 0 16px 0;
  line-height: 1.55;
}

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

.cc-link:hover {
  opacity: 0.8;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cc-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 150ms ease, background-color 150ms ease, border-color 150ms ease;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.cc-btn-primary {
  background: #FFFFFF;
  color: #0A0A0A;
}

.cc-btn-primary:hover {
  background: #F0F0F0;
}

.cc-btn-secondary {
  background: transparent;
  color: var(--cc-text);
  border-color: var(--cc-border);
}

.cc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.24);
}

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

/* --- Modal Overlay --- */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cc-overlay);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.cc-modal-overlay.cc-visible {
  opacity: 1;
}

/* --- Modal --- */
.cc-modal {
  position: relative;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.cc-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  color: var(--cc-text-secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-modal-close:hover {
  color: var(--cc-text);
  background: rgba(255, 255, 255, 0.05);
}

.cc-modal-close:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.cc-modal .cc-title {
  font-size: 17px;
  margin: 0 0 20px 0;
  padding-right: 32px;
}

/* --- Category --- */
.cc-category {
  padding: 16px 0;
  border-top: 1px solid var(--cc-border);
}

.cc-category:last-of-type {
  border-bottom: 1px solid var(--cc-border);
  margin-bottom: 20px;
}

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

.cc-category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cc-text);
}

.cc-category-desc {
  font-size: 13px;
  color: var(--cc-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* --- Toggle switch --- */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

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

.cc-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: background 150ms ease;
}

.cc-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform 150ms ease, background 150ms ease;
}

.cc-switch input:checked + .cc-slider {
  background: #FFFFFF;
}

.cc-switch input:checked + .cc-slider::before {
  transform: translateX(16px);
  background: #0A0A0A;
}

.cc-switch input:focus-visible + .cc-slider {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.cc-switch-disabled .cc-slider {
  opacity: 0.6;
}

.cc-switch-disabled input {
  cursor: not-allowed;
}

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

.cc-modal-actions .cc-btn {
  flex: none;
  min-width: 160px;
}
