/* =================================================================
   WOLFCODING — cookie banner GDPR (sito e landing)
   Colore pulsanti: --cookie-accent (default: --brand del sito)
   ================================================================= */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 480px;
  background: rgba(11, 19, 48, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong, rgba(255,255,255,0.22));
  border-radius: var(--radius-lg, 18px);
  padding: 1.5rem;
  z-index: 200;
  box-shadow: var(--shadow-2, 0 24px 60px rgba(0,0,0,0.45));
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: transform 350ms ease, opacity 350ms ease, visibility 350ms;
  pointer-events: none;
}
.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.cookie-banner h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.6rem; }
.cookie-banner p { font-size: 0.85rem; color: var(--text-dim, #a8b3cf); line-height: 1.5; margin-bottom: 1rem; }
.cookie-banner p a { text-decoration: underline; }

.cookie-options {
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  display: none;
}
.cookie-banner.expanded .cookie-options { display: flex; }

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--line, rgba(255,255,255,0.12));
  font-size: 0.85rem;
}
.cookie-option .info { display: flex; flex-direction: column; }
.cookie-option .name { font-weight: 600; color: var(--text, #ffffff); }
.cookie-option .desc { font-size: 0.78rem; color: var(--text-meta, #6b7799); }
.cookie-option .switch {
  display: block;
  position: relative;
  width: 40px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}
.cookie-option input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cookie-option .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 200ms;
}
.cookie-option input:checked + .switch { background: var(--cookie-accent, var(--brand, #4FB8E8)); }
.cookie-option input:checked + .switch::after { transform: translateX(18px); }
.cookie-option input:focus-visible + .switch { outline: 2px solid var(--cookie-accent, var(--brand, #4FB8E8)); outline-offset: 2px; }
.cookie-option input:disabled + .switch { background: var(--cookie-accent, var(--brand, #4FB8E8)); opacity: 0.5; cursor: not-allowed; }

.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-actions button {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--line-strong, rgba(255,255,255,0.22));
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--text, #ffffff);
  flex: 1;
  min-width: 110px;
  transition: background 150ms, border-color 150ms;
}
.cookie-actions button:hover { background: rgba(255, 255, 255, 0.06); }
.cookie-actions .accept { background: var(--cookie-accent, var(--brand, #4FB8E8)); color: var(--bg-1, #050918); border-color: var(--cookie-accent, var(--brand, #4FB8E8)); }
.cookie-actions .accept:hover { filter: brightness(1.1); }
.cookie-actions .save { display: none; }
.cookie-banner.expanded .cookie-actions .save { display: block; }
.cookie-banner.expanded .cookie-actions .customize { display: none; }

.cookie-banner { font-family: inherit; color: var(--text, #fff); }
.cookie-banner h3, .cookie-banner p { margin: 0; }
.cookie-banner h3 { margin-bottom: 0.6rem; }
.cookie-banner p { margin-bottom: 1rem; }
.cookie-banner a { color: var(--cookie-accent, var(--brand, #4FB8E8)); }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; width: 1px; word-wrap: normal !important;
}

@media (max-width: 720px) {
  .cookie-banner { left: 1rem; right: 1rem; bottom: 1rem; padding: 1.2rem; max-width: none; }
  .cookie-actions { flex-direction: column; }
  .cookie-actions button { min-width: 100%; }
}
@media (max-width: 380px) {
  .cookie-banner { padding: 1rem; }
  .cookie-banner h3 { font-size: 1rem; }
  .cookie-banner p { font-size: 0.82rem; }
  .cookie-actions button { padding: 0.6rem 0.85rem; font-size: 0.82rem; }
}
