/*!
 * Spagnolli Spumanti – Cookie Consent Banner Styles
 * Conforme alle Linee Guida del Garante Privacy (10 giugno 2021)
 * Parità visiva assoluta tra Accetta e Continua senza accettare (Rifiuta)
 */
.sp-cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 680px;
  margin: 0 auto;
  background: rgba(14, 15, 18, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f7f4ee;
  border: 1px solid rgba(179, 135, 40, 0.45);
  border-radius: 4px;
  padding: 1.6rem 1.8rem;
  z-index: 999999;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.sp-cookie-banner * {
  box-sizing: border-box;
}

.sp-cookie-banner[hidden] {
  display: none !important;
}

.sp-cookie-banner__inner {
  position: relative;
}

.sp-cookie-banner__close {
  position: absolute;
  top: -0.6rem;
  right: -0.6rem;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #d6cfc2;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sp-cookie-banner__close:hover,
.sp-cookie-banner__close:focus-visible {
  color: #b38728;
  transform: scale(1.1);
  outline: none;
}

.sp-cookie-banner__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #dfba63;
  margin-bottom: 0.55rem;
}

.sp-cookie-banner__desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #ded8cb;
  margin: 0 0 1.1rem 0;
}

.sp-cookie-banner__desc a {
  color: #dfba63;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sp-cookie-banner__desc a:hover {
  color: #f5d487;
}

.sp-cookie-banner__prefs {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.85rem 0;
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sp-cookie-banner__prefs[hidden] {
  display: none !important;
}

.sp-cookie-check {
  font-size: 0.84rem;
  color: #e8e3d8;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.sp-cookie-check input[type="checkbox"] {
  accent-color: #b38728;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.sp-cookie-check input[type="checkbox"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.sp-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Parità grafica e percettiva assoluta (Linee Guida Garante 2021) */
.sp-cookie-btn--equal {
  flex: 1 1 180px;
  padding: 0.75rem 1.1rem;
  background: transparent;
  color: #f7f4ee;
  border: 1px solid #b38728;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sp-cookie-btn--equal:hover,
.sp-cookie-btn--equal:focus-visible {
  background: #b38728;
  color: #0e0f12;
  border-color: #b38728;
  outline: none;
}

.sp-cookie-btn--secondary {
  flex: 0 1 auto;
  padding: 0.75rem 1rem;
  background: transparent;
  color: #c9c2b4;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.sp-cookie-btn--secondary:hover,
.sp-cookie-btn--secondary:focus-visible {
  border-color: #dfba63;
  color: #ffffff;
  outline: none;
}

/* Pulsante permanente per riaprire e revocare il consenso */
.sp-cookie-reopen {
  position: fixed;
  bottom: 0.85rem;
  left: 0.85rem;
  z-index: 99990;
  background: rgba(14, 15, 18, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #dfba63;
  border: 1px solid rgba(179, 135, 40, 0.45);
  border-radius: 3px;
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sp-cookie-reopen:hover,
.sp-cookie-reopen:focus-visible {
  background: #b38728;
  color: #0e0f12;
  outline: none;
}

@media (max-width: 600px) {
  .sp-cookie-banner {
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    padding: 1.25rem 1.15rem;
  }
  .sp-cookie-btn--equal {
    flex: 1 1 100%;
  }
  .sp-cookie-btn--secondary {
    flex: 1 1 100%;
  }
}

