/* === Cookie Consent — minimal, matches MEAICON design system === */

#cookie-consent-banner {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 9999;
}

.cc-card {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  background: var(--paper, #F2F1EE);
    color: var(--ink, #3D3C3C);
    border: 1px solid rgba(187, 187, 187, 0.18);
    border-radius: 12px;
    padding: 20px 24px 18px;
    box-shadow: 0 12px 40px rgba(61, 60, 60, 0.12);
  font-family: "Inter", sans-serif;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cc-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, #29707A, #4CDD84);
  border-radius: 12px 12px 0 0;
}

.cc-text {
  flex: 1 1 280px;
}

.cc-text p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted, #565049);
}

.cc-text a {
  color: var(--accent, #29707A);
  text-decoration: none;
  font-weight: 500;
}
.cc-text a:hover { text-decoration: underline; }

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

.cc-btn {
  min-height: 40px;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 200ms ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.cc-btn-primary {
  background: var(--accent, #29707A);
  color: #fff;
}
.cc-btn-primary:hover {
  background: var(--accent-strong, #1F5A61);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(41, 112, 122, 0.3);
}
.cc-btn-primary:active { transform: scale(0.98); }

.cc-btn-secondary {
  background: transparent;
  color: var(--muted, #565049);
  border: 1px solid rgba(187, 187, 187, 0.3);
}
.cc-btn-secondary:hover {
  color: var(--accent, #29707A);
  border-color: var(--accent, #29707A);
}

.cc-btn-link {
  background: transparent;
  color: var(--muted, #565049);
  padding: 8px 12px;
  text-decoration: none;
}
.cc-btn-link:hover { color: var(--accent, #29707A); }

/* --- Focus states --- */
.cc-btn:focus-visible,
.cc-text a:focus-visible {
  outline: 2px solid var(--accent, #29707A);
  outline-offset: 2px;
}

/* --- Modal --- */
#cookie-preferences-modal { display: none; }
#cookie-preferences-modal.is-open { display: block; }

.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 43, 43, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
}

.cc-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(92vw, 480px);
  transform: translate(-50%, -50%);
  background: var(--paper, #F2F1EE);
    color: var(--ink, #3D3C3C);
    border: 1px solid rgba(187, 187, 187, 0.18);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(61, 60, 60, 0.2);
  z-index: 10001;
  font-family: "Inter", sans-serif;
}

.cc-modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, #29707A, #4CDD84);
  border-radius: 12px 12px 0 0;
}

.cc-modal h3 {
  margin: 0 0 12px;
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink, #3D3C3C);
}

.cc-modal p {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted, #565049);
}

.cc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  min-height: 44px;
  font-size: 0.8125rem;
  color: var(--ink, #3D3C3C);
}

.cc-toggle input {
  accent-color: var(--accent, #29707A);
  width: 18px;
  height: 18px;
}

.cc-toggle span {
  color: var(--ink, #3D3C3C);
}

/* --- Dark mode --- */
[data-theme="dark"] .cc-card,
[data-theme="dark"] .cc-modal,
:root:not([data-theme="light"]) .cc-card:where(:not([data-theme="light"] *)),
:root:not([data-theme="light"]) .cc-modal:where(:not([data-theme="light"] *)) {
  background: var(--paper, #2B2B2B);
  color: var(--ink, #FFFFFF);
  border-color: var(--line, #565049);
}

[data-theme="dark"] .cc-text p,
[data-theme="dark"] .cc-modal p,
[data-theme="dark"] .cc-toggle span,
:root:not([data-theme="light"]) .cc-text p,
:root:not([data-theme="light"]) .cc-modal p,
:root:not([data-theme="light"]) .cc-toggle span {
  color: var(--muted, #BBBBBB);
}

[data-theme="dark"] .cc-btn-secondary,
:root:not([data-theme="light"]) .cc-btn-secondary {
  color: var(--muted, #BBBBBB);
  border-color: var(--line, #565049);
}

[data-theme="dark"] .cc-modal-backdrop,
:root:not([data-theme="light"]) .cc-modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .cc-btn { transition: none; }
  .cc-btn:hover { transform: none; }
}

/* --- Mobile --- */
@media (max-width: 640px) {
  #cookie-consent-banner { inset: auto 12px 12px 12px; }
  .cc-card {
    flex-direction: column;
    gap: 1rem;
    padding: 18px 16px 16px;
  }
  .cc-text { flex: 1 1 auto; width: 100%; }
  .cc-actions {
    width: 100%;
    flex-direction: column;
  }
  .cc-btn { width: 100%; min-height: 44px; justify-content: center; }
}
