.cookie-consent-root {
  --cc-green: #06763c;
  --cc-green-dark: #055f30;
  --cc-text: #1f2937;
  --cc-muted: #64748b;
  --cc-border: #dbe3ea;
  --cc-bg: #ffffff;
  --cc-soft: #f8fafc;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px 14px 30px;
  color: var(--cc-text);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: rgba(15, 23, 42, .07);
  pointer-events: none;
}

.cookie-consent-root.is-visible {
  display: flex;
}

.cookie-consent-panel {
  width: min(540px, calc(100vw - 28px));
  margin: 0 auto;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .18);
  overflow: hidden;
  pointer-events: auto;
  transform: translateY(8px);
  animation: cookieConsentIn .22s ease forwards;
}

@keyframes cookieConsentIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cookie-consent-content {
  padding: 15px 16px 10px;
}

.cookie-consent-title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0;
}

.cookie-consent-text {
  margin: 0;
  color: var(--cc-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 15px;
}

.cookie-consent-btn {
  min-height: 34px;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  background: #fff;
  color: var(--cc-text);
  padding: 8px 11px;
  font: 800 12px/1.15 inherit;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.cookie-consent-btn:hover {
  transform: translateY(-1px);
}

.cookie-consent-btn:hover,
.cookie-consent-btn:focus {
  border-color: var(--cc-green);
  outline: none;
}

.cookie-consent-btn.is-primary {
  background: var(--cc-green);
  border-color: var(--cc-green);
  color: #fff;
}

.cookie-consent-btn.is-primary:hover,
.cookie-consent-btn.is-primary:focus {
  background: var(--cc-green-dark);
}

.cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .18);
}

.cookie-consent-modal.is-visible {
  display: flex;
}

.cookie-consent-dialog {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--cc-border);
  box-shadow: 0 22px 70px rgba(15, 23, 42, .28);
}

.cookie-consent-dialog-head,
.cookie-consent-dialog-foot {
  padding: 16px;
  border-bottom: 1px solid var(--cc-border);
}

.cookie-consent-dialog-foot {
  border-top: 1px solid var(--cc-border);
  border-bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-consent-dialog-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0;
}

.cookie-consent-dialog-text {
  margin: 0;
  color: var(--cc-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.cookie-consent-options {
  display: grid;
  gap: 0;
}

.cookie-consent-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--cc-border);
}

.cookie-consent-option:last-child {
  border-bottom: 0;
}

.cookie-consent-option strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 13.5px;
}

.cookie-consent-option span {
  display: block;
  color: var(--cc-muted);
  font-size: 12px;
  line-height: 1.45;
}

.cookie-consent-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.cookie-consent-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-consent-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, .28);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.cookie-consent-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
  transition: transform .18s ease;
}

.cookie-consent-switch input:checked + .cookie-consent-slider {
  background: #ffffff;
  border-color: rgba(100, 116, 139, .36);
  box-shadow: none;
}

.cookie-consent-switch input:checked + .cookie-consent-slider::after {
  transform: translateX(20px);
  background: #fff;
}

.cookie-consent-switch input:disabled + .cookie-consent-slider {
  cursor: not-allowed;
  opacity: .75;
}

.cookie-consent-link {
  color: var(--cc-green);
  font-weight: 800;
  text-decoration: none;
}

.cookie-consent-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .cookie-consent-root {
    padding: 12px 10px 18px;
  }

  .cookie-consent-actions,
  .cookie-consent-dialog-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-consent-btn {
    width: 100%;
  }
}
