/* ============================================================
   Nisten Club - GDPR Cookie Consent System
   Colori brand: primario #bc5035, footer #2f302f, bg #eff2f2
   ============================================================ */

/* ---------- Banner cookie in basso ---------- */
#nisten-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  background: #2f302f;
  color: rgba(255,255,255,0.85);
  padding: 18px 24px;
  box-shadow: 0 -3px 16px rgba(0,0,0,0.35);
  font-family: Calibri, sans-serif;
  font-size: 14px;
  display: none; /* mostrato via JS */
}
#nisten-cookie-banner.visible { display: block; }

.nisten-banner-inner {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.nisten-banner-text {
  flex: 1 1 380px;
  line-height: 1.5;
}
.nisten-banner-text strong {
  color: #fff;
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}
.nisten-banner-text a { color: #e8876b; text-decoration: underline; }
.nisten-banner-text a:hover { color: #fff; }

.nisten-banner-btns {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ---------- Pulsanti comuni ---------- */
.nc-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 3px;
  font-family: Calibri, sans-serif;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: .4px;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.nc-btn-primary {
  background: #bc5035;
  color: #fff;
  border-color: #bc5035;
}
.nc-btn-primary:hover { background: #a0402a; border-color: #a0402a; }

.nc-btn-secondary {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.5);
}
.nc-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}
.nc-btn-outline {
  background: transparent;
  color: #e8876b;
  border-color: #e8876b;
}
.nc-btn-outline:hover { background: #bc5035; color: #fff; border-color: #bc5035; }

/* ---------- Overlay modale ---------- */
#nisten-cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99995;
}
#nisten-cookie-overlay.visible { display: block; }

/* ---------- Modale preferenze ---------- */
#nisten-cookie-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  width: 92%;
  max-width: 620px;
  max-height: 90vh;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  font-family: Calibri, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#nisten-cookie-modal.visible { display: flex; }

.nc-modal-header {
  background: #2f302f;
  color: #fff;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.nc-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-family: Calibri, sans-serif;
  color: #fff;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.nc-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.nc-modal-close:hover { color: #fff; }

.nc-modal-body {
  padding: 0 22px 10px;
  overflow-y: auto;
  flex: 1;
}

.nc-modal-intro {
  font-size: 13px;
  color: #666;
  padding: 14px 0 6px;
  line-height: 1.5;
}

/* ---------- Categorie cookie ---------- */
.nc-category {
  border-bottom: 1px solid #e8e8e8;
  padding: 14px 0;
}
.nc-category:last-child { border-bottom: none; }

.nc-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.nc-category-name {
  font-size: 15px;
  color: #33313a;
  font-weight: bold;
}
.nc-category-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.45;
}

/* Etichetta "sempre attivi" */
.nc-always-on {
  font-size: 12px;
  color: #bc5035;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ---------- Toggle switch ---------- */
.nc-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}
.nc-toggle input { opacity: 0; width: 0; height: 0; }
.nc-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background .25s;
}
.nc-slider:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s;
}
.nc-toggle input:checked + .nc-slider { background: #bc5035; }
.nc-toggle input:checked + .nc-slider:before { transform: translateX(22px); }

/* ---------- Footer modale ---------- */
.nc-modal-footer {
  padding: 14px 22px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  background: #f7f7f7;
  border-top: 1px solid #e8e8e8;
  flex-shrink: 0;
}
/* pulsanti in modale (sfondo chiaro) */
.nc-modal-footer .nc-btn-secondary {
  background: transparent;
  color: #555;
  border-color: #aaa;
}
.nc-modal-footer .nc-btn-secondary:hover {
  background: #eee;
  border-color: #888;
  color: #333;
}

/* ---------- Pulsante flottante privacy ---------- */
#nisten-privacy-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 99980;
  width: 48px;
  height: 48px;
  background: #bc5035;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .2s;
  title: "Gestisci preferenze cookie";
}
#nisten-privacy-fab:hover {
  background: #a0402a;
  transform: scale(1.07);
}
/* Icona lucchetto SVG inline via CSS */
#nisten-privacy-fab svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* ---------- Placeholder mappa bloccata ---------- */
.nc-map-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}
.nc-map-wrapper iframe {
  display: block;
  width: 100%;
}
.nc-map-placeholder {
  position: absolute;
  inset: 0;
  background: #eff2f2;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  box-sizing: border-box;
}
.nc-map-placeholder-inner {
  font-family: Calibri, sans-serif;
}
.nc-map-placeholder-inner p {
  color: #555;
  font-size: 13px;
  margin: 0 0 10px;
  line-height: 1.4;
}
.nc-map-placeholder-inner strong {
  color: #33313a;
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

/* ---------- Placeholder Facebook bloccato ---------- */
.nc-fb-placeholder {
  background: #f0f2f5;
  border: 1px solid #dde;
  border-radius: 4px;
  padding: 16px;
  text-align: center;
  font-family: Calibri, sans-serif;
  font-size: 13px;
  color: #555;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nc-fb-placeholder span { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .nisten-banner-inner { flex-direction: column; align-items: flex-start; }
  .nisten-banner-btns { width: 100%; }
  .nc-btn { font-size: 12px; padding: 8px 13px; }
  #nisten-cookie-modal { width: 96%; }
  #nisten-privacy-fab { bottom: 14px; right: 14px; width: 42px; height: 42px; }
  #nisten-privacy-fab svg { width: 19px; height: 19px; }
}
