/* ── Cookie Consent Banner ── GDPR / PDPA Compliant ── */

:root {
  --cc-bg:        #ffffff;
  --cc-backdrop:  rgba(0, 0, 0, 0.55);
  --cc-text:      #1f2937;
  --cc-muted:     #6b7280;
  --cc-border:    #e5e7eb;
  --cc-primary:   #111827;
  --cc-primary-h: #374151;
  --cc-danger:    #dc2626;
  --cc-danger-h:  #b91c1c;
  --cc-ghost:     #f3f4f6;
  --cc-ghost-h:   #e5e7eb;
  --cc-radius:    12px;
  --cc-shadow:    0 10px 40px rgba(0, 0, 0, 0.18);
  --cc-max-width: 1100px;
}

/* ── Banner (sticky bottom) ── */
.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--cc-bg);
  border-top: 1px solid var(--cc-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 18px 20px;
  transform: translateY(120%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-banner.is-visible {
  transform: translateY(0);
}
.cc-banner__inner {
  max-width: var(--cc-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cc-banner__text {
  flex: 1 1 280px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--cc-text);
}
.cc-banner__text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}
.cc-banner__text a {
  color: var(--cc-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cc-banner__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Buttons ── */
.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
}
.cc-btn:hover {
  transform: translateY(-1px);
}
.cc-btn:active {
  transform: translateY(0);
}
.cc-btn--primary {
  background: var(--cc-primary);
  color: #fff;
}
.cc-btn--primary:hover {
  background: var(--cc-primary-h);
}
.cc-btn--danger {
  background: #fff;
  color: var(--cc-danger);
  border-color: var(--cc-danger);
}
.cc-btn--danger:hover {
  background: var(--cc-danger);
  color: #fff;
}
.cc-btn--ghost {
  background: var(--cc-ghost);
  color: var(--cc-text);
  border-color: var(--cc-border);
}
.cc-btn--ghost:hover {
  background: var(--cc-ghost-h);
}

/* ── Settings Modal ── */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--cc-backdrop);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cc-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cc-modal {
  background: var(--cc-bg);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-modal-overlay.is-open .cc-modal {
  transform: translateY(0) scale(1);
}
.cc-modal__header {
  padding: 22px 26px 10px;
}
.cc-modal__header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--cc-text);
}
.cc-modal__header p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--cc-muted);
  line-height: 1.5;
}
.cc-modal__body {
  padding: 10px 26px;
  overflow-y: auto;
}
.cc-category {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cc-border);
}
.cc-category:last-child {
  border-bottom: none;
}
.cc-category__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--cc-ghost);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.cc-category__info {
  flex: 1 1 auto;
}
.cc-category__info h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--cc-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-category__info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cc-muted);
  line-height: 1.45;
}
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  margin-top: 6px;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  transition: background 0.25s ease;
}
.cc-toggle__slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.cc-toggle input:checked + .cc-toggle__slider {
  background: var(--cc-primary);
}
.cc-toggle input:checked + .cc-toggle__slider::before {
  transform: translateX(20px);
}
.cc-toggle input:disabled + .cc-toggle__slider {
  opacity: 0.5;
  cursor: not-allowed;
}
.cc-modal__footer {
  padding: 16px 26px 22px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--cc-border);
  background: #fafafa;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .cc-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-banner__actions {
    justify-content: stretch;
  }
  .cc-btn {
    flex: 1 1 0;
    min-width: unset;
  }
  .cc-modal__footer {
    flex-direction: column;
  }
}
