/* ===================================================================   STILI V2 PER IL COOKIE BANNER CUSTOM (ANTI-OVERFLOW & NAV-MATCH)=================================================================== */

.cookie-banner-overlay {
  position: fixed !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 95%;
  max-width: 600px;
  background-color: #ffffff;
  box-shadow: 0 15px 50px rgba(0,0,0,0.3) !important;
  border-radius: 16px;
  z-index: 2147483647 !important;
  font-family: var(--body-font, 'Plus Jakarta Sans', sans-serif);
  border: 1px solid rgba(0, 0, 0, 0.08);
  max-height: 90vh !important;
  overflow-y: auto !important;
}

.cookie-banner-content {
  padding: 24px;
}

.cookie-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.cookie-icon {
  font-size: 24px;
  color: var(--primary-color, #1f4f8f);
  margin-right: 12px;
}

.cookie-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--dark-color, #121212);
}

.cookie-body p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.cookie-body a {
  color: var(--primary-color, #1f4f8f);
  text-decoration: underline;
  font-weight: 600;
}

/* =========================================   BOTTONI DEL BANNER - STILE ALLINEATO AL SITO========================================= */

.cookie-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-actions-main {
  display: flex;
  gap: 10px;
}

.btn-cookie {
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease-in-out !important;
}

/* IL PULSANTE ACCETTA TUTTI (Sincronizzato con il tuo .btn-default) */

.btn-cookie-primary {
  position: relative !important;
  display: inline-block !important;
  background-color: var(--primary-color, #1f4f8f) !important;
  color: #ffffff !important;
  border: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

/* L'animazione nera classica ad hover del tuo ristorante */

.btn-cookie-primary::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 0 !important;
  height: 100% !important;
  background: var(--secondary-color, #000000) !important;
  z-index: -1 !important;
  transition: all 0.4s ease-in-out !important;
}

.btn-cookie-primary:hover::after {
  width: 100% !important;
  left: 0 !important;
  right: auto !important;
}

.btn-cookie-primary:hover {
  color: #ffffff !important;
}

/* PULSANTI SECONDARI OUTLINE */

.btn-cookie-outline {
  background-color: transparent !important;
  color: var(--dark-color, #121212) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.btn-cookie-outline:hover {
  background-color: #f8f9fa !important;
  border-color: rgba(0, 0, 0, 0.3) !important;
}

/* SCATOLA DELLE PREFERENZE AVANZATE */

.cookie-preferences-box {
  background-color: #fbfcfe;
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid rgba(31, 79, 143, 0.1);
}

.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.cookie-option:last-child {
  border-bottom: none;
}

.cookie-option-text strong {
  display: block;
  font-size: 14px;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.cookie-option-text span {
  display: block;
  font-size: 12px;
  color: #666;
  padding-right: 15px;
  line-height: 1.4;
}

/* INTERRUTTORI TOGGLE IN CSS */

.toggle-checkbox {
  display: none;
}

.toggle-label {
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #e0e0e0;
  border-radius: 24px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.toggle-label::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toggle-checkbox:checked + .toggle-label {
  background-color: var(--primary-color, #1f4f8f);
}

.toggle-checkbox:checked + .toggle-label::after {
  transform: translateX(20px);
}

/* ===================================================================   3. OTTIMIZZAZIONE RESPONSIVE ULTRA-MOBILE (PREVENZIONE ESPLOSIONE)=================================================================== */

@media (max-width: 576px) {
  .cookie-banner-overlay {
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 85vh !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15) !important;
  }
}

@media (max-width: 576px) {
  .cookie-banner-content {
    padding: 20px 16px 24px 16px !important;
  }
}

@media (max-width: 576px) {
  .cookie-body p {
    font-size: 13px !important;
    margin-bottom: 15px !important;
  }
}

@media (max-width: 576px) {
  .cookie-footer {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
}

@media (max-width: 576px) {
  .cookie-actions-main {
    flex-direction: column !important;
    gap: 8px !important;
  }
}

@media (max-width: 576px) {
  .btn-cookie {
    width: 100% !important;
    text-align: center !important;
    padding: 14px 20px !important;
  }
}

