body > .cookie-consent-backdrop,
.cookie-consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  z-index: 1200;
}

body > .cookie-consent,
body > .cookie-preferences,
.cookie-consent,
.cookie-preferences {
  position: fixed !important;
  left: 50% !important;
  top: max(12px, env(safe-area-inset-top, 0px)) !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 14px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.25);
  z-index: 1201;
  color: #0f172a;
}

.cookie-preferences {
  top: 50% !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
}

.cookie-consent__inner,
.cookie-preferences__inner {
  padding: 18px;
}

.cookie-consent h2,
.cookie-preferences h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.cookie-consent p,
.cookie-preferences p,
.cookie-preferences li {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-consent__actions,
.cookie-preferences__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cookie-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-btn--primary {
  background: #002046;
  color: #ffffff;
  border-color: #002046;
}

.cookie-btn--ghost {
  background: #ffffff;
}

.cookie-link {
  color: #002046;
  text-decoration: underline;
}

.cookie-pref-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
}

.cookie-pref-row:first-of-type {
  border-top: 0;
}

.cookie-pref-row small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}

.cookie-toggle {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.cookie-embed-placeholder {
  border: 1px dashed rgba(15, 23, 42, 0.3);
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  margin-top: 12px;
}

.cookie-embed-placeholder p {
  margin: 0 0 12px;
  color: #334155;
}

@media (max-width: 640px) {
  body > .cookie-consent,
  body > .cookie-preferences,
  .cookie-consent,
  .cookie-preferences {
    width: calc(100% - 16px);
  }

  body > .cookie-consent,
  body > .cookie-preferences,
  .cookie-consent,
  .cookie-preferences {
    left: 8px !important;
    right: 8px !important;
    transform: none;
  }

  body > .cookie-consent,
  .cookie-consent {
    top: max(8px, env(safe-area-inset-top, 0px)) !important;
    bottom: auto !important;
  }

  body > .cookie-preferences,
  .cookie-preferences {
    top: max(8px, env(safe-area-inset-top, 0px)) !important;
    bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
    overflow: auto;
  }
}
