/* ABC Preventivi - Frontend CSS v1.1.0 */

/* ── Bottone colonna destra ──────────────────────────── */
.abc-preventivi-btn-wrapper {
  margin: .8rem 0;
}
.abc-preventivi-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

/* ── Wrapper pannello ────────────────────────────────── */
.abc-preventivi-wrapper {
  margin: 2rem 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: visible; /* per la modale */
  position: relative;
  scroll-margin-top: 80px; /* offset per header fisso se presente */
}

.abc-preventivi-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.2rem;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  transition: background .2s;
}
.abc-preventivi-toggle:hover { background: #ebebeb; }
.abc-prev-icon { font-size: 1.1rem; }
.abc-prev-chevron { margin-left: auto; }

/* ── Pannello ────────────────────────────────────────── */
.abc-preventivi-panel {
  padding: 1.5rem 1.2rem;
  background: #fff;
}
.abc-preventivi-panel.abc-prev-hidden { display: none; }

.abc-prev-product-info {
  padding: .6rem .8rem;
  background: #f9f9f9;
  border-left: 3px solid #0066cc;
  margin-bottom: 1.2rem;
  font-size: .9rem;
}
.abc-prev-ref { color: #666; }

/* ── Alert ───────────────────────────────────────────── */
.abc-prev-alert {
  padding: .75rem 1rem;
  border-radius: 3px;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.abc-prev-alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.abc-prev-alert.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Grid ────────────────────────────────────────────── */
.abc-prev-row  { display: flex; gap: 1rem; margin-bottom: 1rem; }
.abc-prev-col  { flex: 1; min-width: 0; }
.abc-prev-full { margin-bottom: 1rem; }

/* ── Label e input ───────────────────────────────────── */
.abc-preventivi-panel label {
  display: block; margin-bottom: .3rem;
  font-size: .875rem; font-weight: 600; color: #333;
}
.abc-preventivi-panel input[type="text"],
.abc-preventivi-panel input[type="email"],
.abc-preventivi-panel input[type="tel"],
.abc-preventivi-panel textarea {
  width: 100%; padding: .5rem .75rem;
  border: 1px solid #ccc; border-radius: 3px;
  font-size: .9rem; box-sizing: border-box; transition: border-color .2s;
}
.abc-preventivi-panel input:focus,
.abc-preventivi-panel textarea:focus {
  border-color: #0066cc; outline: none;
  box-shadow: 0 0 0 2px rgba(0,102,204,.15);
}
.abc-req { color: #cc0000; }

/* ── Privacy ─────────────────────────────────────────── */
.abc-prev-privacy label {
  display: flex; align-items: flex-start;
  gap: .5rem; font-weight: normal; font-size: .85rem; cursor: pointer;
}
.abc-prev-privacy input[type="checkbox"] { margin-top: .2rem; flex-shrink: 0; }

/* ── Submit ──────────────────────────────────────────── */
.abc-prev-submit-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.abc-prev-btn        { min-width: 160px; }
.abc-prev-required-note { font-size: .8rem; color: #666; }

/* ── Honeypot ────────────────────────────────────────── */
.abc-prev-hp { position: absolute; left: -9999px; visibility: hidden; }

/* ── Modale di conferma ──────────────────────────────── */
.abc-prev-modal-overlay {
  position: fixed; inset: 0; z-index: 999999999;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}

.abc-prev-modal {
  background: #fff; border-radius: 8px;
  padding: 2rem 2rem 1.5rem;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  animation: abcPrevModalIn .25s ease;
}

@keyframes abcPrevModalIn {
  from { opacity:0; transform: scale(.9) translateY(-10px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

.abc-prev-modal-icon { font-size: 2.5rem; margin-bottom: .5rem; }

.abc-prev-modal h3 {
  margin: 0 0 .75rem; font-size: 1.3rem; color: #1a1a1a;
}

.abc-prev-modal p {
  font-size: .95rem; color: #555; margin: 0 0 1.5rem; line-height: 1.5;
}

body.abc-prev-no-scroll { overflow: hidden; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
  .abc-prev-row         { flex-direction: column; gap: .5rem; }
  .abc-prev-submit-row  { flex-direction: column; align-items: flex-start; }
  .abc-prev-btn         { width: 100%; }
}

/* ── Divisore ────────────────────────────────────────── */
.abc-prev-divisore {
  border: none;
  border-top: 1px solid #ccc;
  margin: 1.5rem 0;
}

/* ── Testi prima/dopo ────────────────────────────────── */
.abc-prev-testo-prima {
  margin-bottom: 1rem;
  font-size: .9rem;
  color: #444;
  line-height: 1.5;
}
.abc-prev-testo-dopo {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  font-size: .9rem;
  color: #444;
  line-height: 1.5;
}

/* ── Modale countdown ────────────────────────────────── */
.abc-prev-modal-countdown {
  font-size: .85rem;
  color: #888;
  margin: -.5rem 0 1rem;
}

/* ── Bottone trigger (colori di default, override via CSS inline da BO) ─ */
.abc-preventivi-trigger-btn {
  color: #ffffff;
  background-color: #7eb725;
  border-color: #68961f;
}
.abc-preventivi-trigger-btn:hover,
.abc-preventivi-trigger-btn:focus {
  color: #ffffff;
  background-color: #68961f;
  border-color: #3e5912;
}

/* ── Testo dopo il bottone (colonna destra) ──────────── */
.abc-prev-testo-dopo-btn {
  margin-top: .6rem;
  font-size: .85rem;
  color: #555;
  line-height: 1.4;
}

/* ── Testi copiati dentro il form ────────────────────── */
.abc-prev-testo-nel-form {
  padding: .6rem .8rem;
  background: #f9f9f9;
  border-radius: 3px;
  margin-bottom: 1rem;
  font-size: .875rem;
  color: #444;
  line-height: 1.5;
}

/* ── Select tipologia ────────────────────────────────── */
.abc-preventivi-panel select {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: .9rem;
  box-sizing: border-box;
  transition: border-color .2s;
  background: #fff;
}
.abc-preventivi-panel select:focus {
  border-color: #0066cc;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,102,204,.15);
}

/* ── File input ──────────────────────────────────────── */
.abc-preventivi-panel input[type="file"] {
  width: 100%;
  padding: .4rem 0;
  font-size: .9rem;
}
.abc-prev-file-note {
  display: block;
  font-size: .8rem;
  color: #888;
  margin-top: .2rem;
}

/* ── Facoltativo ─────────────────────────────────────── */
.abc-optional {
  font-weight: normal;
  font-size: .8rem;
  color: #888;
  margin-left: .3rem;
}
