/* ===============================
   CONTAINER DIALOG
=============================== */

.ui-dialog.smediapopup {
  border-radius: 18px !important;
  border: none !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.35) !important;
  max-width: 560px !important;
  width: min(560px, 94vw) !important;
  overflow: hidden;
  background: #fff;
}

/* ===============================
   RIMUOVE COMPLETAMENTE TITLEBAR
=============================== */

.ui-dialog.smediapopup .ui-dialog-titlebar {
  display: none !important;
}

/* ===============================
   CONTENT
=============================== */

.ui-dialog.smediapopup .ui-dialog-content {
  padding: 28px 22px 26px !important;
  background: #fff;
  color: #1c2430;
  text-align: center;
}

/* ===============================
   TITOLO
=============================== */

#modalwindow-presave h2 {
  font-size: 0 !important;
  margin: 0 0 12px 0 !important;
}

#modalwindow-presave h2::after {
  content: "Pre-save su Spotify";
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}

/* ===============================
   DESCRIZIONE
=============================== */

#modalwindow-presave #popdescription {
  font-size: 0 !important;
}

#modalwindow-presave #popdescription::after {
  content: "Collega Spotify per salvare automaticamente questa release nella tua libreria il giorno di uscita.";
  display: block;
  font-size: 15px;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 22px;
}

/* ===============================
   NOTE AZIONI (NASCOSTE)
=============================== */

#modalwindow-presave .notelimit,
#modalwindow-presave .gate_option_container,
#modalwindow-presave .gate_option_desc {
  display: none !important;
}

/* ===============================
   CTA BUTTON
=============================== */

#modalwindow-presave .buttonP {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

#modalwindow-presave .btn.btn-primary,
#modalwindow-presave #btn-gate-continue,
#modalwindow-presave #btn-gate-continue-2 {
  background: #1db954 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 26px !important;
  font-size: 15px;
  font-weight: 700;
  color: #fff !important;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

#modalwindow-presave .btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(29,185,84,.35);
}

/* Sovrascrive testo bottone */
#modalwindow-presave #btn-gate-continue {
  font-size: 0 !important;
}

#modalwindow-presave #btn-gate-continue::after {
  content: "Continua su Spotify";
  font-size: 15px;
  font-weight: 700;
}

/* ===============================
   PARTNER TECNICO
=============================== */

#modalwindow-presave .privacydisplay {
  font-size: 0 !important;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

#modalwindow-presave .privacydisplay::after {
  content: "Partner tecnico: LabelGrid";
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
}

/* ===============================
   SUCCESS STATE
=============================== */

.ls-presave-success {
  padding: 28px 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #14532d;
  background: #ecfdf5;
  border-radius: 14px;
}

/* ===============================
   FIX: SUCCESS VISIBILE ANCHE SE
   PRE-SAVE GIĄ EFFETTUATO
=============================== */

.ui-dialog[aria-describedby="modalwindow-presave"]
.ls-presave-success {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 16px !important;
  line-height: 1.4;
  text-align: center;
}

/* Evita conflitti con font-size:0 */
.ui-dialog[aria-describedby="modalwindow-presave"]
.ls-presave-success * {
  display: inline !important;
  font-size: inherit !important;
}

/* Se LabelGrid apre gią in stato finale
.ui-dialog[aria-describedby="modalwindow-presave"]
#popdescription {
  display: none !important;
}*/

/* =========================================================
   NASCONDI DESCRIZIONE SOLO NELLO STATO SUCCESS
========================================================= */

.ui-dialog[aria-describedby="modalwindow-presave"]
.ls-presave-success ~ #popdescription,
.ui-dialog[aria-describedby="modalwindow-presave"]
.ls-presave-success + #popdescription {
  display: none !important;
}

/* ===============================
   NASCONDE HELP ?
=============================== */

.smediapopup #lg-gate-help-ico,
.smediapopup #lg-gate-help-dialog {
  display: none !important;
}

/* ===============================
   NASCONDE POPUP DURANTE OAUTH
=============================== */

.ls-hidden-during-oauth {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===============================
   CLOSE BUTTON (X)
=============================== */

.ls-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.06);
  cursor: pointer;
  z-index: 1000;
  transition: background .15s ease, transform .15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 6L6 18M6 6l12 12' stroke='%230f172a' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.ls-dialog-close:hover {
  background-color: rgba(0, 0, 0, 0.12);
  transform: scale(1.05);
}

/* ===============================
   CONTEXT FIX
=============================== */

.ui-dialog[aria-describedby] {
  position: relative !important;
}

/* ===============================
   MOBILE
=============================== */

@media (max-width: 480px) {
  .ui-dialog.smediapopup {
    width: 94vw !important;
  }
}
