/* ============================================================
   VISURIA OCCHIALI — GDPR Cookie Consent CSS
   ============================================================ */

/* ---- Overlay ---- */
.gdpr-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.gdpr-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

/* ---- Banner ---- */
.gdpr-banner {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22), 0 4px 16px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px 36px 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.35s ease;
}

.gdpr-overlay--visible .gdpr-banner {
  transform: translateY(0);
}

/* Scrollbar sottile */
.gdpr-banner::-webkit-scrollbar { width: 4px; }
.gdpr-banner::-webkit-scrollbar-track { background: transparent; }
.gdpr-banner::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }

/* ---- Logo ---- */
.gdpr-logo {
  margin-bottom: 20px;
}

.gdpr-logo img {
  height: 28px;
  width: auto;
  display: block;
}

/* ---- Vista ---- */
.gdpr-view {
  display: none;
}

.gdpr-view--active {
  display: block;
}

/* ---- Testi ---- */
.gdpr-title {
  font-size: 20px;
  font-weight: 600;
  color: #0a0a0a;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.3;
}

.gdpr-text {
  font-size: 14px;
  color: #555;
  line-height: 1.65;
  margin: 0 0 24px;
}

.gdpr-text--small {
  font-size: 13px;
  margin-bottom: 20px;
}

.gdpr-link {
  color: #c6a05f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gdpr-link:hover {
  color: #a8843e;
}

/* ---- Pulsanti ---- */
.gdpr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.gdpr-actions--prefs {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.gdpr-btn {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.gdpr-btn--primary {
  background: #0a0a0a;
  color: #ffffff;
  padding: 12px 24px;
}

.gdpr-btn--primary:hover {
  background: #2a2a2a;
}

.gdpr-btn--ghost {
  background: transparent;
  color: #0a0a0a;
  padding: 11px 24px;
  border: 1px solid #d0d0d0;
}

.gdpr-btn--ghost:hover {
  border-color: #0a0a0a;
  background: #f8f8f8;
}

.gdpr-btn--text {
  background: transparent;
  color: #888;
  padding: 12px 8px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gdpr-btn--text:hover {
  color: #0a0a0a;
}

/* ---- Pulsante indietro ---- */
.gdpr-back {
  background: none;
  border: none;
  color: #888;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.gdpr-back:hover {
  color: #0a0a0a;
}

/* ---- Categorie cookie ---- */
.gdpr-categories {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gdpr-category {
  padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
}

.gdpr-category:last-child {
  border-bottom: none;
}

.gdpr-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 16px;
}

.gdpr-category__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gdpr-category__name {
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0a;
  letter-spacing: -0.01em;
}

.gdpr-category__desc {
  font-size: 13px;
  color: #777;
  line-height: 1.6;
  margin: 0;
}

/* ---- Badge ---- */
.gdpr-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gdpr-badge--required {
  background: rgba(198, 160, 95, 0.12);
  color: #a8843e;
}

/* ---- Toggle switch ---- */
.gdpr-toggle {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.gdpr-toggle--disabled {
  cursor: default;
  opacity: 0.7;
}

.gdpr-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gdpr-toggle__track {
  width: 44px;
  height: 26px;
  border-radius: 100px;
  background: #d0d0d0;
  position: relative;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.gdpr-toggle__track--on {
  background: #0a0a0a;
}

.gdpr-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.25s ease;
}

.gdpr-toggle__track--on .gdpr-toggle__thumb {
  transform: translateX(18px);
}

/* ---- Nota legale ---- */
.gdpr-legal {
  font-size: 11.5px;
  color: #aaa;
  line-height: 1.6;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

/* ---- Pulsante riapertura (angolo in basso a sinistra) ---- */
.gdpr-reopen {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.2s ease;
}

.gdpr-reopen:hover {
  background: #f5f5f5;
  color: #0a0a0a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.16);
  transform: scale(1.05);
}

/* ---- Body lock (blocca scroll quando banner è aperto) ---- */
.gdpr-body-lock {
  overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .gdpr-overlay {
    align-items: flex-end;
    padding: 0 0 0;
  }

  .gdpr-banner {
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    padding: 28px 24px 32px;
  }

  .gdpr-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gdpr-btn {
    text-align: center;
  }

  .gdpr-btn--text {
    text-align: center;
  }

  .gdpr-actions--prefs {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
