/* ══════════════════════════════
   COOKIE BANNER — discreto e compatto
   Conforme GDPR Garante italiano
══════════════════════════════ */

/* ── BANNER PRINCIPALE — barra sottile ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8001;
  background: rgba(26,23,18,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(201,169,110,0.2);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.visible {
  transform: translateY(0);
}
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-desc {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(244,240,232,0.75);
  flex: 1;
  min-width: 200px;
}
.cookie-desc a {
  color: #c9a96e;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  min-height: 32px;
}
.cookie-btn-accept {
  background: #8b6914;
  color: #f4f0e8;
}
.cookie-btn-accept:hover { background: #a07c28; }
.cookie-btn-reject {
  background: transparent;
  color: rgba(244,240,232,0.6);
  border: 1px solid rgba(244,240,232,0.2);
}
.cookie-btn-reject:hover {
  border-color: rgba(244,240,232,0.5);
  color: #f4f0e8;
}
.cookie-btn-settings {
  background: transparent;
  border: none;
  color: rgba(201,169,110,0.7);
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  padding: 0.3rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.cookie-btn-settings:hover { color: #c9a96e; }

/* ── OVERLAY (solo per il pannello) ── */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,12,10,0.5);
  z-index: 8000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cookie-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════
   PANNELLO PREFERENZE
══════════════════════════════ */
.cookie-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8002;
  background: #f4f0e8;
  border-top: 1px solid rgba(139,105,20,0.25);
  box-shadow: 0 -8px 40px rgba(14,12,10,0.15);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 80vh;
  overflow-y: auto;
}
.cookie-panel.visible { transform: translateY(0); }
.cookie-panel-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 2rem 2.5rem;
}
.cookie-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(139,105,20,0.15);
}
.cookie-panel-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 300;
  color: #1a1712;
}
.cookie-panel-close {
  background: none;
  border: 1px solid rgba(139,105,20,0.25);
  color: #5a5448;
  width: 32px; height: 32px;
  cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
}
.cookie-panel-close:hover { border-color: #8b6914; color: #1a1712; }

.cookie-category {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(139,105,20,0.1);
}
.cookie-category:last-of-type { border-bottom: none; }
.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.cookie-category-name {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: #1a1712;
}
.cookie-category-desc {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #5a5448;
}

/* Toggle */
.cookie-toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.cookie-toggle-slider {
  position: absolute; inset: 0;
  background: #d8d3c5;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.3s;
}
.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  left: 3px; top: 3px;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: #8b6914; }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(18px); }
.cookie-toggle input:disabled + .cookie-toggle-slider { opacity: 0.5; cursor: not-allowed; }
.cookie-toggle-label {
  font-size: 0.6rem; letter-spacing: 0.1em;
  color: #8b6914; text-transform: uppercase;
  display: block; text-align: center; margin-top: 0.2rem;
}

/* Bottoni pannello */
.cookie-panel-actions {
  display: flex; gap: 0.8rem;
  margin-top: 1.5rem; flex-wrap: wrap;
}
.cookie-panel-actions .cookie-btn-accept,
.cookie-panel-actions .cookie-btn-reject { flex: 1; padding: 0.65rem 1rem; }
.cookie-save {
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.65rem 1rem;
  background: transparent; color: #1a1712;
  border: 1px solid #1a1712;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  min-height: 36px; flex: 1;
}
.cookie-save:hover { background: #1a1712; color: #f4f0e8; }

/* ── PULSANTE RIAPERTURA — minimalista ── */
.cookie-reopen {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 7000;
  background: rgba(26,23,18,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201,169,110,0.25);
  color: rgba(201,169,110,0.7);
  font-size: 0.9rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
}
.cookie-reopen.visible { display: flex; }
.cookie-reopen:hover {
  background: rgba(26,23,18,0.9);
  border-color: rgba(201,169,110,0.5);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .cookie-banner-inner {
    padding: 0.8rem 1.2rem;
    gap: 0.8rem;
  }
  .cookie-desc { font-size: 0.72rem; min-width: 0; }
  .cookie-actions { gap: 0.4rem; }
  .cookie-btn { font-size: 0.6rem; padding: 0.4rem 0.7rem; }
  .cookie-panel-inner { padding: 1.5rem; }
  .cookie-panel-actions { flex-direction: column; }
  .cookie-reopen { bottom: 5rem; }
}
