/*
 * dm-modal.css
 * Stili per il sistema modal lead (dm-lead-modal.php).
 * Caricato dal plugin dm-lead-consent solo sulle pagine
 * che impostano $GLOBALS['dm_load_lead_modal'] = true.
 *
 * Variabili CSS richieste (già definite nel tema):
 *   --ink, --paper, --gold, --cold, --muted
 *   --serif, --mono, --sans
 */

/* ══════════════════════════════════════════
   BASE MODAL
══════════════════════════════════════════ */
.dm-modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.dm-modal.open {
  opacity: 1;
  visibility: visible;
}

.dm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 16, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dm-modal-box {
  position: relative;
  background: #0e0e18;
  border: 1px solid rgba(255, 215, 0, .14);
  border-radius: 4px;
  padding: 2rem 2rem 1.8rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(18px);
  transition: transform .25s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}
.dm-modal.open .dm-modal-box {
  transform: translateY(0);
}

.dm-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  background: rgba(255, 215, 0, .06);
  border: 1px solid rgba(255, 215, 0, .15);
  border-radius: 4px;
  color: rgba(245, 242, 235, .4);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.dm-modal-close:hover {
  background: rgba(255, 215, 0, .14);
  border-color: rgba(255, 215, 0, .4);
  color: var(--gold);
}

/* ══════════════════════════════════════════
   CONTENUTO MODAL
══════════════════════════════════════════ */
.dm-modal-eyebrow {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .6rem;
}

.dm-modal-title {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(245, 242, 235, .92);
  margin: 0 0 .75rem;
  line-height: 1.3;
}
.dm-modal-title em {
  font-style: italic;
  color: var(--gold);
}

.dm-modal-sub {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .82rem;
  line-height: 1.6;
  color: rgba(245, 242, 235, .55);
  margin: 0 0 1.2rem;
}

.dm-modal-note {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .72rem;
  color: rgba(245, 242, 235, .3);
  margin: 1rem 0 0;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   MODAL CONTATTO — canali diretti
══════════════════════════════════════════ */
.dm-modal-channels {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: 1.2rem;
}

.dm-channel-btn {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1.1rem;
  border: 1px solid rgba(245, 242, 235, .12);
  border-radius: 3px;
  background: rgba(245, 242, 235, .03);
  color: rgba(245, 242, 235, .7);
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
}
.dm-channel-btn:hover {
  border-color: rgba(245, 242, 235, .25);
  background: rgba(245, 242, 235, .07);
  color: var(--paper, #f5f2eb);
}
.dm-channel-btn.dm-channel-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #080810;
  font-weight: 700;
}
.dm-channel-btn.dm-channel-primary:hover {
  background: #ffe033;
  border-color: #ffe033;
  color: #080810;
}

/* ══════════════════════════════════════════
   MODAL LEAD — form e perks
══════════════════════════════════════════ */
.dm-template-perks {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
  margin-bottom: 1.2rem;
}
.dm-template-perks span {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .72rem;
  color: rgba(245, 242, 235, .5);
}

.dm-lead-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.dm-field-group {
  display: flex;
  gap: .5rem;
}

.dm-input {
  flex: 1;
  background: rgba(245, 242, 235, .05);
  border: 1px solid rgba(245, 242, 235, .15);
  border-radius: 3px;
  padding: .65rem .9rem;
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .85rem;
  color: var(--paper, #f5f2eb);
  outline: none;
  transition: border-color .2s;
}
.dm-input::placeholder {
  color: rgba(245, 242, 235, .25);
}
.dm-input:focus {
  border-color: rgba(255, 215, 0, .45);
}

.dm-submit {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.1rem;
  background: var(--gold);
  border: none;
  border-radius: 3px;
  color: #080810;
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, opacity .2s;
}
.dm-submit:hover {
  background: #ffe033;
}
.dm-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ── GDPR consent ── */
.dm-consent-label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  cursor: pointer;
}
.dm-consent-check {
  margin-top: .15rem;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--gold);
  cursor: pointer;
}
.dm-consent-label span {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .68rem;
  line-height: 1.55;
  color: rgba(245, 242, 235, .38);
}
.dm-consent-link {
  color: rgba(255, 215, 0, .65);
  text-decoration: underline;
}
.dm-consent-link:hover {
  color: var(--gold);
}

/* ── Stato successo ── */
.dm-lead-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem 1rem;
  text-align: center;
}
.dm-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(74, 222, 128, .12);
  border: 1px solid rgba(74, 222, 128, .3);
  color: #4ade80;
  font-size: 1.2rem;
}
.dm-lead-success p {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .85rem;
  color: rgba(245, 242, 235, .7);
  margin: 0;
}

/* ── Stato errore ── */
.dm-lead-error {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .75rem;
  color: #f87171;
  line-height: 1.5;
  margin-top: .25rem;
}

/* ══════════════════════════════════════════
   BOTTONE SHORTCODE [download_kpi]
══════════════════════════════════════════ */
.dm-shortcode-download {
  margin: 1.5rem 0;
}
.dm-shortcode-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1.5rem;
  background: var(--gold);
  color: #080810;
  font-family: var(--sans, 'Roboto', sans-serif);
  font-weight: 700;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  transition: opacity .2s;
}
.dm-shortcode-btn:hover {
  opacity: .85;
}

/* ══════════════════════════════════════════
   BOTTONE HERO .bcc (Contattami)
══════════════════════════════════════════ */
.bcc {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.3rem;
  background: transparent;
  border: 1px solid rgba(255, 215, 0, .45);
  border-radius: 3px;
  color: var(--gold);
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.bcc:hover {
  background: rgba(255, 215, 0, .07);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, .18);
}
@media (max-width: 540px) {
  .bcc { display: none; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 480px) {
  .dm-modal-box {
    padding: 1.5rem 1.25rem 1.4rem;
  }
  .dm-field-group {
    flex-direction: column;
  }
  .dm-submit {
    width: 100%;
    justify-content: center;
  }
}

/* ── Select ruolo ── */
.dm-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(245,242,235,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
.dm-select option {
  background: #0e0e18;
  color: var(--paper, #f5f2eb);
}

/* ── Meta formato/dimensione ── */
.dm-lead-meta {
  font-family: var(--sans, 'Roboto', sans-serif);
  font-size: .68rem;
  color: rgba(245, 242, 235, .3);
  margin: -.25rem 0 .25rem;
}
