.cookie-consent {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 10000;
  color: #e5e7eb;
  pointer-events: none;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent__panel {
  width: min(760px, 100%);
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
  pointer-events: auto;
}

.cookie-consent--listener .cookie-consent__panel {
  width: min(560px, 100%);
  padding: 10px 12px;
}

.cookie-consent__copy {
  min-width: 0;
}

.cookie-consent__copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.cookie-consent__copy p {
  margin: 3px 0 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.35;
}

.cookie-consent__copy a {
  display: inline-flex;
  margin-top: 3px;
  color: #86efac;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.cookie-consent__copy a:hover,
.cookie-consent__copy a:focus-visible {
  text-decoration: underline;
}

.cookie-consent__actions,
.cookie-consent__dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-consent button {
  min-height: 36px;
  margin: 0;
  padding: 0 13px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cookie-consent__primary {
  border: 1px solid rgba(34, 197, 94, 0.6);
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
}

.cookie-consent__secondary {
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
}

.cookie-consent__modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.54);
  pointer-events: auto;
  overflow-y: auto;
}

.cookie-consent__modal[hidden] {
  display: none;
}

.cookie-consent__dialog {
  width: min(560px, 100%);
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #0f172a;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
  overflow: hidden;
}

.cookie-consent__dialog h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 20px;
  flex: 0 0 auto;
}

.cookie-consent__dialog-body {
  min-height: 0;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.cookie-consent__dialog p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.5;
}

.cookie-consent__choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.54);
}

.cookie-consent__choice input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #22c55e;
}

.cookie-consent__choice strong {
  display: block;
  color: #f8fafc;
}

.cookie-consent__choice span {
  color: #cbd5e1;
  line-height: 1.45;
}

.cookie-consent__choice.is-locked {
  opacity: 0.78;
}

.cookie-consent__dialog-actions {
  flex: 0 0 auto;
  padding-top: 4px;
}

html[data-app-theme="light"] .cookie-consent {
  color: #0f172a;
}

html[data-app-theme="light"] .cookie-consent__panel,
html[data-app-theme="light"] .cookie-consent__dialog {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

html[data-app-theme="light"] .cookie-consent__copy p,
html[data-app-theme="light"] .cookie-consent__dialog p,
html[data-app-theme="light"] .cookie-consent__choice span {
  color: #334155;
}

html[data-app-theme="light"] .cookie-consent__copy a {
  color: #15803d;
}

html[data-app-theme="light"] .cookie-consent__secondary {
  border-color: rgba(15, 23, 42, 0.18);
  background: #f8fafc;
  color: #0f172a;
}

html[data-app-theme="light"] .cookie-consent__dialog h2,
html[data-app-theme="light"] .cookie-consent__choice strong {
  color: #0f172a;
}

html[data-app-theme="light"] .cookie-consent__choice {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f8fafc;
}

@media (max-width: 720px) {
  .cookie-consent {
    inset: auto 10px 10px;
  }

  .cookie-consent__panel {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-consent__actions {
    justify-content: stretch;
  }

  .cookie-consent__actions button {
    flex: 1 1 120px;
  }

  .cookie-consent__modal {
    align-items: flex-start;
    padding: 10px;
  }

  .cookie-consent__dialog {
    max-height: calc(100dvh - 20px);
    padding: 14px;
  }
}
