.lw-consent[hidden] { display: none !important; }

.lw-consent {
  position: fixed;
  z-index: 300;
  right: clamp(12px, 2.5vw, 32px);
  bottom: clamp(12px, 2.5vw, 32px);
  left: clamp(12px, 2.5vw, 32px);
  color: #3a2a26;
  font-family: var(--font-text, "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.lw-consent__panel {
  width: min(100%, 1120px);
  margin-left: auto;
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(22px, 4vw, 52px);
  align-items: end;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff7f5;
  border: 1px solid rgba(107, 31, 46, 0.24);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(46, 15, 22, 0.22);
}

.lw-consent__copy { max-width: 660px; }
.lw-consent__eyebrow {
  margin: 0 0 8px;
  color: #a4854b;
  font: 600 0.75rem/1.2 var(--font-text, "Golos Text", sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lw-consent h2,
.lw-consent-dialog h2 {
  margin: 0;
  color: #2e0f16;
  font: 500 clamp(1.8rem, 3vw, 2.55rem)/1 var(--font-display, "Cormorant Garamond", Georgia, serif);
  letter-spacing: -0.015em;
}
.lw-consent__copy > p:not(.lw-consent__eyebrow, .lw-consent__links) {
  margin: 12px 0 0;
  font-size: 1rem;
  line-height: 1.55;
}
.lw-consent__links { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.875rem; }
.lw-consent a,
.lw-consent-dialog a { color: #6b1f2e; text-underline-offset: 3px; }

.lw-consent__actions,
.lw-consent-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.lw-consent__button {
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid rgba(107, 31, 46, 0.38);
  border-radius: 999px;
  background: transparent;
  color: #2e0f16;
  cursor: pointer;
  font: 500 0.875rem/1.15 var(--font-text, "Golos Text", sans-serif);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.lw-consent__button:hover { background: rgba(107, 31, 46, 0.08); transform: translateY(-1px); }
.lw-consent__button--equal { background: #6b1f2e; border-color: #6b1f2e; color: #fff7f5; }
.lw-consent__button--equal:hover { background: #7e2638; }
.lw-consent__button:focus-visible,
.lw-consent a:focus-visible,
.lw-consent-dialog button:focus-visible,
.lw-consent-dialog a:focus-visible,
.lw-consent-dialog input:focus-visible + span {
  outline: 3px solid #a4854b;
  outline-offset: 3px;
}

.lw-consent-dialog {
  width: min(calc(100% - 24px), 720px);
  max-height: min(88vh, 88dvh, 820px);
  padding: 0;
  color: #3a2a26;
  background: #fff7f5;
  border: 1px solid rgba(107, 31, 46, 0.24);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(46, 15, 22, 0.32);
  font-family: var(--font-text, "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}
.lw-consent-dialog::backdrop { background: rgba(46, 15, 22, 0.62); }
.lw-consent-dialog__panel { padding: clamp(22px, 4vw, 38px); overflow: auto; }
.lw-consent-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.lw-consent-dialog__close {
  flex: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(107, 31, 46, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #2e0f16;
  cursor: pointer;
  font: 400 1.7rem/1 sans-serif;
}
.lw-consent-dialog__panel > p { font-size: 0.95rem; line-height: 1.55; }
.lw-consent-option {
  margin-top: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(107, 31, 46, 0.16);
  border-radius: 14px;
  background: #fbe3e1;
}
.lw-consent-option h3 { margin: 0; color: #2e0f16; font-size: 1rem; }
.lw-consent-option p { margin: 6px 0 0; font-size: 0.875rem; line-height: 1.5; }
.lw-consent-status { color: #6b1f2e; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.lw-consent-option--toggle { cursor: pointer; }
.lw-consent-switch { position: relative; display: block; width: 52px; height: 30px; }
.lw-consent-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lw-consent-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(107, 31, 46, 0.4);
  border-radius: 999px;
  background: rgba(107, 31, 46, 0.12);
  transition: background-color 160ms ease;
}
.lw-consent-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff7f5;
  box-shadow: 0 2px 8px rgba(46, 15, 22, 0.25);
  transition: transform 160ms ease;
}
.lw-consent-switch input:checked + span { background: #6b1f2e; }
.lw-consent-switch input:checked + span::after { transform: translateX(22px); }
.lw-consent-dialog__note { margin: 16px 0 22px; color: #6a5a55; }
.lw-consent-sr {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 850px) {
  .lw-consent__panel { grid-template-columns: 1fr; align-items: start; }
  .lw-consent__actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .lw-consent { right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; }
  .lw-consent__panel { padding: 18px; border-radius: 16px; }
  .lw-consent__actions,
  .lw-consent-dialog__actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .lw-consent__button { width: 100%; }
  .lw-consent-option { align-items: start; }
  .lw-consent-status { white-space: normal; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .lw-consent__button,
  .lw-consent-switch span,
  .lw-consent-switch span::after { transition: none; }
}
