/* =========================================================
   ARENA UI — COOKIE CONSENT COMPONENT
   Estratto e ottimizzato da arena-ui.css
   Mobile-first • Zero modifiche visive
========================================================= */


/* ---------------------------------------------------------
   1) COOKIE BANNER WRAPPER
--------------------------------------------------------- */

.cc-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;

  z-index: 10050;
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));

  pointer-events: none;
}


/* ---------------------------------------------------------
   2) COOKIE BANNER CARD
--------------------------------------------------------- */

.cc-banner .cc-card {
  max-width: 980px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 10px;

  background: rgba(5,8,22,.88);
  border: 1px solid rgba(51,65,85,.8);
  box-shadow: 0 4px 14px rgba(15,23,42,.6);

  pointer-events: auto;
}

/* Nasconde il titolo grande nella versione banner */
#cc-banner .cc-title {
  display: none;
}


/* ---------------------------------------------------------
   3) COOKIE BANNER TEXT
--------------------------------------------------------- */

.cc-desc {
  font-size: .78rem;
  line-height: 1.25;
  color: #cbd5e1;
  margin: 0;
}

.cc-link {
  color: var(--zl-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-dot {
  color: #64748b;
  padding: 0 6px;
}


/* ---------------------------------------------------------
   4) ACTIONS (Buttons mini)
--------------------------------------------------------- */

.cc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.cc-actions .btn {
  padding: .4rem .75rem;
  font-size: .7rem;
  letter-spacing: .04em;
  box-shadow: none;
}


/* ---------------------------------------------------------
   5) COOKIE BANNER — MOBILE LAYOUT
--------------------------------------------------------- */

@media (max-width: 640px) {

  .cc-banner .cc-card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .cc-actions {
    justify-content: flex-end;
  }
}


/* ---------------------------------------------------------
   6) COOKIE MODAL (overlay)
--------------------------------------------------------- */

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;

  background: rgba(2,6,23,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* FIX HARD: hidden deve SEMPRE precedere */
#cc-modal[hidden],
#cc-banner[hidden] {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* ---------------------------------------------------------
   7) COOKIE MODAL CARD
--------------------------------------------------------- */

.cc-modal-card {
  width: min(720px, 96vw);
  margin-bottom: 10px;

  max-height: calc(100vh - 24px - env(safe-area-inset-bottom));
  overflow: auto;
}


/* ---------------------------------------------------------
   8) COOKIE MODAL — DESKTOP CENTERING
--------------------------------------------------------- */

@media (min-width: 768px) {

  .cc-modal {
    align-items: center;
    padding-bottom: 12px;
  }

  .cc-modal-card {
    margin-bottom: 0;
    max-height: calc(100vh - 24px);
  }
}


/* ---------------------------------------------------------
   9) COOKIE MODAL — MOBILE FOCUS FIX
--------------------------------------------------------- */

@media (max-width: 768px) {
  .cc-modal button:focus,
  .cc-modal button:active {
    outline: none;
    box-shadow: none;
  }
}
