/* =============================================================
   Quario · Contact widget (riutilizzabile su qualsiasi pagina)
   Modal contatti self-contained. Classi scoped "qcw-" per non
   collidere con gli stili della pagina ospite.
   Apri con: QuarioContact.open()
   ============================================================= */

.qcw-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(2, 4, 12, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.qcw-overlay[data-open="true"] { opacity: 1; visibility: visible; }

.qcw-modal {
  position: relative;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 48px); overflow-y: auto;
  padding: 40px 38px 34px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  background: linear-gradient(160deg, #0c1024 0%, #070a18 100%);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  transform: translateY(16px) scale(0.98);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
  color: #e8eaf2;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}
.qcw-overlay[data-open="true"] .qcw-modal { transform: translateY(0) scale(1); }

.qcw-close {
  position: absolute; top: 16px; right: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #c8cce0;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.qcw-close:hover { background: rgba(255,255,255,0.10); color: #fff; }

.qcw-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #c4b5fd; margin-bottom: 12px;
}
.qcw-modal h3 {
  font-size: 26px; font-weight: 800; line-height: 1.18;
  letter-spacing: -0.02em; margin: 0 0 10px; color: #fff;
}
.qcw-sub { font-size: 15px; color: #aeb3c8; margin: 0 0 24px; line-height: 1.5; }

.qcw-row { display: flex; gap: 12px; }
.qcw-row .qcw-input { flex: 1; min-width: 0; }
.qcw-input, .qcw-textarea {
  width: 100%; box-sizing: border-box;
  padding: 13px 15px; margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: #fff; font-size: 15px; font-family: inherit;
  transition: border-color .2s, background .2s;
}
.qcw-input::placeholder, .qcw-textarea::placeholder { color: #777e9a; }
.qcw-input:focus, .qcw-textarea:focus {
  outline: none; border-color: #8b5cf6;
  background: rgba(139,92,246,0.06);
}
.qcw-textarea { min-height: 110px; resize: vertical; }

/* Selettore tipologia investitore (mostrato solo in modalità investor) */
.qcw-investor-field { margin: 0; }
.qcw-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23b8a6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
.qcw-select:invalid { color: #777e9a; }
.qcw-select option { color: #0c1024; background: #fff; }

.qcw-checks { display: flex; flex-direction: column; gap: 11px; margin: 6px 0 18px; }
.qcw-check { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.45; color: #9ea3bb; cursor: pointer; }
.qcw-check input { margin-top: 2px; accent-color: #8b5cf6; flex-shrink: 0; }
.qcw-check strong { color: #cdd2e6; }
.qcw-check .qcw-req { color: #f0abfc; }

.qcw-submit {
  width: 100%; padding: 14px 20px;
  border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(120deg, #8b5cf6, #06b6d4);
  color: #fff; font-size: 15px; font-weight: 700; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: filter .2s, transform .1s;
}
.qcw-submit:hover { filter: brightness(1.08); }
.qcw-submit:active { transform: translateY(1px); }
.qcw-submit:disabled { opacity: .6; cursor: default; }

.qcw-msg { margin-top: 12px; font-size: 13.5px; min-height: 18px; text-align: center; }
.qcw-msg.qcw-ok { color: #4ade80; }
.qcw-msg.qcw-error { color: #fb7185; }
.qcw-msg.qcw-sending { color: #9ea3bb; }

.qcw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.qcw-success { text-align: center; padding: 18px 4px; }
.qcw-success-icon {
  width: 60px; height: 60px; margin: 0 auto 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(120deg, #8b5cf6, #06b6d4); color: #fff; font-size: 30px;
}
.qcw-success h4 { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.qcw-success p { font-size: 15px; color: #aeb3c8; margin: 0; }
.qcw-hidden { display: none !important; }

@media (max-width: 520px) {
  .qcw-modal { padding: 34px 22px 26px; border-radius: 20px; }
  .qcw-row { flex-direction: column; gap: 0; }
  .qcw-modal h3 { font-size: 22px; }
}
