/* ==========================================================================
   Cookie banner / preferenze consenso - Linea-Erotica.net
   Nero, testo bianco, pulsanti blu. Nessuna dipendenza.
   ========================================================================== */
:root {
  --lec-bg: #0b0b0b;
  --lec-bg-2: #171717;
  --lec-text: #ffffff;
  --lec-muted: #c9c9c9;
  --lec-blue: #1a73e8;
  --lec-blue-dark: #1558b8;
  --lec-border: rgba(255, 255, 255, 0.14);
  --lec-radius: 12px;
  --lec-font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- banner ---------- */
.le-consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  background: var(--lec-bg);
  color: var(--lec-text);
  border: 1px solid var(--lec-border);
  border-radius: var(--lec-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  padding: 22px 24px 20px;
  z-index: 100000;
  font-family: var(--lec-font);
  font-size: 14px;
  line-height: 1.55;
  box-sizing: border-box;
  animation: le-consent-in 0.35s ease-out;
}
.le-consent[hidden] { display: none; }
.le-consent:focus { outline: none; }
@keyframes le-consent-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.le-consent * { box-sizing: border-box; }
.le-consent__title {
  margin: 0 0 8px;
  font-family: "Oswald", var(--lec-font);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--lec-text);
}
.le-consent__text { margin: 0 0 6px; color: var(--lec-text); }
.le-consent__text p { margin: 0 0 6px; }
.le-consent__text a, .le-consent__prefs a {
  color: #8ab4f8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.le-consent__text a:hover, .le-consent__prefs a:hover { color: #fff; }
.le-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.le-consent__btn {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--lec-blue);
  background: var(--lec-blue);
  color: #fff;
  font: 600 14px/1 var(--lec-font);
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  flex: 1 1 160px;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  min-height: 44px;
}
.le-consent__btn:hover { background: var(--lec-blue-dark); border-color: var(--lec-blue-dark); }
.le-consent__btn:active { transform: translateY(1px); }
.le-consent__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.le-consent__btn--ghost { background: transparent; color: #fff; }
.le-consent__btn--ghost:hover { background: rgba(26, 115, 232, 0.25); }
.le-consent__footnote {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--lec-muted);
}

/* ---------- finestra preferenze ---------- */
.le-consent__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: var(--lec-font);
  font-size: 14px;
  line-height: 1.55;
}
.le-consent__overlay[hidden] { display: none; }
.le-consent__prefs {
  background: var(--lec-bg);
  color: var(--lec-text);
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: var(--lec-radius);
  border: 1px solid var(--lec-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  padding: 22px 24px 20px;
  position: relative;
  box-sizing: border-box;
}
.le-consent__prefs * { box-sizing: border-box; }
.le-consent__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--lec-border);
  background: var(--lec-bg-2);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.le-consent__close:hover { background: var(--lec-blue); border-color: var(--lec-blue); }
.le-consent__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.le-consent__cat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--lec-border);
}
.le-consent__cat:last-of-type { border-bottom: 1px solid var(--lec-border); }
.le-consent__cat h3 {
  margin: 0 0 4px;
  font: 600 15px/1.3 var(--lec-font);
  text-transform: none;
  color: #fff;
}
.le-consent__cat p { margin: 0; color: var(--lec-muted); font-size: 13px; }
.le-consent__cat-body { flex: 1 1 auto; }
.le-consent__lock {
  font-size: 12px;
  color: #8ab4f8;
  font-weight: 600;
  white-space: nowrap;
  padding-top: 2px;
}
/* interruttore */
.le-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
  margin-top: 2px;
}
.le-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.le-switch__slider {
  position: absolute;
  inset: 0;
  background: #3a3a3a;
  border-radius: 28px;
  transition: background 0.2s;
  cursor: pointer;
}
.le-switch__slider:before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.le-switch input:checked + .le-switch__slider { background: var(--lec-blue); }
.le-switch input:checked + .le-switch__slider:before { transform: translateX(20px); }
.le-switch input:focus-visible + .le-switch__slider { outline: 3px solid #fff; outline-offset: 2px; }
.le-switch input:disabled + .le-switch__slider { opacity: 0.6; cursor: not-allowed; }

/* ---------- pulsante di richiamo (in basso a destra) ---------- */
.le-consent-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--lec-bg);
  border: 2px solid var(--lec-blue);
  color: #fff;
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 0;
  transition: transform 0.15s, background 0.15s;
}
.le-consent-fab[hidden] { display: none; }
.le-consent-fab:hover { background: var(--lec-blue); transform: scale(1.06); }
.le-consent-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.le-consent-fab svg { width: 26px; height: 26px; fill: currentColor; }
.le-consent-fab__tip {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--lec-bg);
  color: #fff;
  border: 1px solid var(--lec-border);
  font: 12px/1 var(--lec-font);
  padding: 7px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.le-consent-fab:hover .le-consent-fab__tip,
.le-consent-fab:focus-visible .le-consent-fab__tip { opacity: 1; }

/* ---------- mobile ---------- */
@media (max-width: 600px) {
  .le-consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    border-radius: 14px 14px 0 0;
    padding: 18px 16px 16px;
    max-height: 85vh;
    overflow: auto;
  }
  @keyframes le-consent-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
  .le-consent__btn { flex: 1 1 100%; }
  .le-consent__prefs { padding: 18px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .le-consent, .le-consent__btn, .le-consent-fab { animation: none; transition: none; }
}
