.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 10, 0.72);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 80;
}
.cookie-overlay[hidden],
.cookie-banner[hidden] { display: none !important; }
.cookie-modal {
  position: relative;
  width: min(500px, 100%);
  background: var(--card, #171f25);
  color: var(--text, #e8eef0);
  border: 1px solid var(--line, #2a353c);
  border-radius: 12px;
  box-shadow: var(--shadow, 0 12px 40px rgba(0, 0, 0, 0.28));
  padding: 22px 22px 18px;
}
.cookie-modal h2 {
  margin: 0 36px 8px 0;
  font-size: 18px;
  font-weight: 600;
}
.cookie-lead {
  margin: 0 0 16px;
  color: var(--muted, #8b9aa3);
  font-size: 13px;
  line-height: 1.45;
}
.cookie-list { display: grid; gap: 10px; }
.cookie-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line, #2a353c);
}
.cookie-row:first-child { border-top: 0; padding-top: 0; }
.cookie-row-text { min-width: 0; flex: 1; }
.cookie-row-text strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 4px;
}
.cookie-row-text p {
  margin: 0;
  color: var(--muted, #8b9aa3);
  font-size: 12px;
  line-height: 1.4;
}
.cookie-switch {
  width: 40px;
  height: 22px;
  flex: 0 0 40px;
  margin-top: 2px;
  border: 0;
  border-radius: 999px;
  background: #4a555c;
  padding: 2px;
  cursor: pointer;
}
.cookie-switch.on { background: var(--teal, #3d9b8f); }
.cookie-switch.locked { cursor: default; opacity: 0.95; }
.cookie-knob {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.16s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}
.cookie-switch.on .cookie-knob { transform: translateX(18px); }
.cookie-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #8b9aa3);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.cookie-x:hover { background: var(--hover, #182228); color: var(--text, #e8eef0); }
.cookie-x svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.cookie-btn {
  height: 34px;
  border: 1px solid var(--line, #2a353c);
  border-radius: 7px;
  background: transparent;
  color: var(--text, #e8eef0);
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.cookie-btn:hover { border-color: var(--teal, #3d9b8f); }
.cookie-btn-teal {
  background: var(--teal, #3d9b8f);
  border-color: var(--teal, #3d9b8f);
  color: #06201c;
}
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  max-width: 640px;
  margin: 0 auto;
  background: var(--card, #171f25);
  color: var(--text, #e8eef0);
  border: 1px solid var(--line, #2a353c);
  border-radius: 12px;
  box-shadow: var(--shadow, 0 12px 40px rgba(0, 0, 0, 0.28));
  padding: 14px 16px;
}
.cookie-banner p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #8b9aa3);
}
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
button.cookie-foot-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 6px 0;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
button.cookie-foot-link:hover { color: var(--teal, #3d9b8f); }
@media (max-width: 520px) {
  .cookie-actions,
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-actions .cookie-btn,
  .cookie-banner-actions .cookie-btn { flex: 1 1 calc(50% - 8px); }
}
