.cookie-consent {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 900;
  background: #fff;
  border: 1px solid var(--line, #E5E7EB);
  border-radius: var(--radius-lg, 14px);
  box-shadow: none;
  animation: cookieIn .25s ease-out;
}
.cookie-consent[hidden] { display: none; }
@keyframes cookieIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-consent-inner {
  display: flex; align-items: center; gap: 22px;
  padding: 18px 22px; flex-wrap: wrap;
}
.cookie-consent-text { flex: 1 1 320px; min-width: 280px; }
.cookie-consent-text p { margin: 0; font-size: .92rem; color: var(--ink, #0E1726); line-height: 1.5; }
.cookie-consent-links { margin-top: 6px !important; font-size: .82rem !important; }
.cookie-consent-links a { color: var(--primary, #0F766E); text-decoration: underline; }
.cookie-consent-links a:hover { text-decoration: none; }
.cookie-consent-links span { color: var(--ink-light, #6B7280); margin: 0 4px; }
.cookie-consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-cookie {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-cookie-primary { background: var(--primary, #0F766E); color: #fff; border-color: var(--primary, #0F766E); }
.btn-cookie-primary:hover { background: var(--primary-dark, #115E59); border-color: var(--primary-dark, #115E59); }
.btn-cookie-secondary { background: #fff; color: var(--ink, #0E1726); border-color: var(--line, #E5E7EB); }
.btn-cookie-secondary:hover { background: var(--bg-alt, #F1F5F9); }
.btn-cookie-ghost { background: transparent; color: var(--ink-light, #6B7280); border-color: transparent; }
.btn-cookie-ghost:hover { color: var(--ink, #0E1726); background: var(--bg-alt, #F1F5F9); }

@media (max-width: 720px) {
  .cookie-consent { left: 8px; right: 8px; bottom: 8px; }
  .cookie-consent-inner { padding: 16px; gap: 14px; flex-direction: column; align-items: stretch; }
  .cookie-consent-actions { justify-content: flex-end; }
  .btn-cookie { flex: 1; min-width: 0; }
}

.cookie-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.cookie-modal[hidden] { display: none; }
.cookie-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(14, 23, 38, .55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.cookie-modal-dialog {
  position: relative; background: #fff;
  border-radius: var(--radius-lg, 14px);
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  animation: cookieModalIn .2s ease-out;
}
@keyframes cookieModalIn {
  from { opacity: 0; transform: translateY(-20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cookie-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--line, #E5E7EB);
  flex-shrink: 0;
}
.cookie-modal-head h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--ink, #0E1726); }
.cookie-modal-close {
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-light, #6B7280);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.cookie-modal-close:hover { background: var(--bg-alt, #F1F5F9); color: var(--ink, #0E1726); }

.cookie-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.cookie-modal-intro { color: var(--ink-light, #6B7280); margin: 0 0 18px; font-size: .92rem; }

.cookie-cat { padding: 14px 0; border-bottom: 1px solid var(--line, #E5E7EB); }
.cookie-cat:last-child { border-bottom: 0; }
.cookie-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 4px; cursor: pointer;
}
.cookie-cat-head strong { font-size: .96rem; color: var(--ink, #0E1726); }
.cookie-cat p { margin: 4px 0 0; font-size: .86rem; color: var(--ink-light, #6B7280); line-height: 1.5; }
.cookie-cat-required {
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary, #0F766E); background: rgba(15, 118, 110, .1);
  padding: 4px 10px; border-radius: 999px;
}

.cookie-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.cookie-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.cookie-switch-slider {
  position: absolute; inset: 0;
  background: var(--line, #E5E7EB); border-radius: 999px; transition: background .15s;
}
.cookie-switch-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform .15s; box-shadow: none;
}
.cookie-switch input[type="checkbox"]:checked + .cookie-switch-slider { background: var(--primary, #0F766E); }
.cookie-switch input[type="checkbox"]:checked + .cookie-switch-slider::after { transform: translateX(20px); }

.cookie-modal-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 24px; border-top: 1px solid var(--line, #E5E7EB);
  background: var(--bg-alt, #F1F5F9);
  flex-shrink: 0; flex-wrap: wrap;
}
@media (max-width: 520px) {
  .cookie-modal-foot { flex-direction: column-reverse; }
  .cookie-modal-foot .btn-cookie { width: 100%; }
}
body.has-cookie-modal { overflow: hidden; }

/* Fix toggle interactivity */
.cookie-switch { cursor: pointer; }
.cookie-switch input[type="checkbox"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.cookie-switch-slider { pointer-events: none; }
.cookie-cat-head { user-select: none; }
