/* ============================================================================
 * NUOVA OTTICA.vision - Promozioni: stili condivisi da tutte le landing
 * Font Montserrat servito in locale (niente Google Fonts) + banner cookie.
 * ============================================================================ */

/* ---- Montserrat variabile (100-900), stessi file del sito principale ---- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/montserrat-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/montserrat-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF;
}

/* ============================================================================
   COOKIE CONSENT BANNER (GDPR)
   Ripreso dal sito appuntamenti, con i colori delle landing.
   ============================================================================ */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(17,17,17,0.18), 0 2px 6px rgba(17,17,17,0.08);
  border: 1px solid #e5e5e5;
  max-width: 1100px;
  margin: 0 auto;
  font-family: "Montserrat", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  animation: cookie-slide-up 0.35s ease-out;
}
.cookie-banner[hidden] { display: none; }

@keyframes cookie-slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
}
.cookie-banner-text {
  flex: 1;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
}
.cookie-banner-text a {
  color: #1a1a1a;
  text-decoration: underline;
  font-weight: 500;
}
.cookie-banner-text a:hover { color: #b85e00; }

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.cookie-link {
  color: #1a1a1a;
  text-decoration: underline;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 4px;
  font-family: inherit;
}
.cookie-link:hover { color: #b85e00; }

.cookie-btn-accept {
  background: #ff8500;
  color: #111;
  border: none;
  padding: 14px 26px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}
.cookie-btn-accept:hover { background: #e57700; }

/* ====== COOKIE MODAL ====== */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: "Montserrat", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #1a1a1a;
}
.cookie-modal[hidden] { display: none; }

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}
.cookie-modal-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  animation: cookie-modal-in 0.2s ease-out;
}
@keyframes cookie-modal-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
}
.cookie-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111;
}
.cookie-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #5a5a5a;
  cursor: pointer;
  padding: 0;
  width: 32px; height: 32px;
}
.cookie-modal-close:hover { color: #111; }

.cookie-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}
.cookie-modal-body > p {
  margin: 0 0 20px;
  font-size: 14px;
  color: #5a5a5a;
}

.cookie-category {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}
.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.cookie-category h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}
.cookie-category p {
  margin: 0;
  font-size: 13px;
  color: #5a5a5a;
  line-height: 1.55;
}

/* Toggle switch */
.cookie-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.cookie-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cookie-toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  background: #c8c8c8;
  border-radius: 999px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.cookie-toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cookie-toggle input:checked + .cookie-toggle-track {
  background: #ff8500;
}
.cookie-toggle input:checked + .cookie-toggle-track .cookie-toggle-dot {
  transform: translateX(18px);
}
.cookie-toggle input:focus-visible + .cookie-toggle-track {
  box-shadow: 0 0 0 3px rgba(255,133,0,.35);
}
.cookie-toggle--locked .cookie-toggle-track {
  background: #ff8500;
  opacity: 0.6;
}
.cookie-toggle--locked .cookie-toggle-track .cookie-toggle-dot {
  transform: translateX(18px);
}
.cookie-toggle-label {
  font-size: 12px;
  color: #5a5a5a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.cookie-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.cookie-btn-secondary {
  background: #fff;
  color: #111;
  border: 1px solid #c8c8c8;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.cookie-btn-secondary:hover {
  border-color: #111;
  background: #fafafa;
}

@media (max-width: 768px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 20px;
    gap: 16px;
  }
  .cookie-banner-text {
    font-size: 13px;
  }
  .cookie-banner-actions {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
  }
  .cookie-btn-accept {
    flex: 1;
    order: 3;
    width: 100%;
    padding: 14px 20px;
  }
  .cookie-modal-footer {
    flex-direction: column-reverse;
  }
  .cookie-modal-footer button {
    width: 100%;
  }
}
