/**
 * Elianto Assistenza Tecnica — Stile form nativo
 * Wrapper: .elianto-form-wrap — adatta i selettori al tema attivo se necessario.
 */

/* ── Layout sezioni ─────────────────────────────────────────────────── */
.elianto-section {
  margin-bottom: 28px;
}

.elianto-section-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f0f0f0;
  color: #1a1a1a;
}

/* ── Grid colonne ───────────────────────────────────────────────────── */
.elianto-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.elianto-col {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.elianto-col.full {
  flex: 1 1 100%;
}

.elianto-col.sm {
  flex: 0 1 100px;
}

/* ── Labels ─────────────────────────────────────────────────────────── */
.elianto-form label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  display: block;
  margin-bottom: 4px;
}

.req {
  color: #e8720c;
  margin-left: 2px;
}

.opt {
  color: #999;
  font-weight: 400;
  font-size: 12px;
}

/* ── Input / Select / Textarea ──────────────────────────────────────── */
.elianto-form input[type="text"],
.elianto-form input[type="email"],
.elianto-form input[type="tel"],
.elianto-form select,
.elianto-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.elianto-form input:focus,
.elianto-form select:focus,
.elianto-form textarea:focus {
  outline: none;
  border-color: #f5a623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, .15);
}

.elianto-form textarea {
  resize: vertical;
  min-height: 110px;
}

/* ── Validazione nativa HTML5 ───────────────────────────────────────── */
.elianto-form input:invalid:not(:placeholder-shown),
.elianto-form select:invalid {
  border-color: #e74c3c;
}

/* ── Blocco tariffe ─────────────────────────────────────────────────── */
.elianto-tariffe {
  background: #f9f9f6;
  border: 1px solid #e8e8e0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 13.5px;
  line-height: 1.65;
}

.elianto-tariffe p {
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.elianto-tariffe-nota {
  font-weight: 400 !important;
  font-size: 13px;
  color: #555 !important;
  line-height: 1.6;
  margin-bottom: 14px !important;
}

.elianto-tariffe-scroll {
  overflow-x: auto;
}

.elianto-tariffe-tabella {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px; /* evita colonne troppo schiacciate sotto ~480px: sotto, scorre in orizzontale */
}

.elianto-tariffe-tabella th,
.elianto-tariffe-tabella td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e8e8e0;
  color: #333;
  font-weight: 400;
}

.elianto-tariffe-tabella th {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.elianto-tariffe-tabella th a {
  color: inherit;
}

.elianto-tariffe-tabella tbody tr:last-child td {
  border-bottom: none;
}

.elianto-tariffe-range {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: #777;
}

.elianto-tariffe-tabella tr.elianto-tariffa-attiva td {
  background: #fff7ed;
  font-weight: 700;
}

.elianto-tariffe-tabella tr.elianto-tariffa-attiva td:first-child {
  box-shadow: inset 4px 0 0 #f5a623;
}

.elianto-tariffe-riga-nota td {
  font-size: 12px;
  font-weight: 400;
  color: #777;
  font-style: italic;
  padding-top: 0;
}

/* ── Badge zona (iniettato via JS) ──────────────────────────────────── */
.elianto-zona-badge {
  background: #f5a623;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.elianto-zona-badge--caricamento {
  background: #eee;
  color: #666;
  font-weight: 400;
}

/* ── Honeypot anti-spam — invisibile agli utenti reali ──────────────── */
.elianto-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Checkbox consensi ──────────────────────────────────────────────── */
.elianto-consensi {
  margin-bottom: 16px;
}

.elianto-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 10px;
  font-weight: 400 !important;
  font-size: 13.5px !important;
  color: #333 !important;
}

.elianto-checkbox input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #f5a623;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Comune + pulsante calcola km ──────────────────────────────────── */
.elianto-comune-wrap {
  display: flex;
  gap: 8px;
}

.elianto-comune-wrap input {
  flex: 1 1 auto;
  min-width: 0;
}

.elianto-btn-calcola {
  flex-shrink: 0;
  box-sizing: border-box;
  background: #fff;
  color: #e8720c;
  border: 1px solid #e8720c;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.elianto-btn-calcola:hover {
  background: #e8720c;
  color: #fff;
}

.elianto-btn-calcola:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ── Submit ─────────────────────────────────────────────────────────── */
.elianto-submit {
  background: #f5a623;
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 10px;
}

.elianto-submit:hover {
  background: #e8720c;
  transform: translateY(-1px);
}

.elianto-submit:active {
  transform: translateY(0);
}

.elianto-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* ── Messaggi di risposta form ───────────────────────────────────────── */
.elianto-form-msg {
  border-radius: 6px;
  padding: 0;
  margin-top: 12px;
  font-size: 14px;
  min-height: 0;
}

.elianto-form-msg:empty {
  margin-top: 0;
}

.elianto-form-msg--info {
  padding: 12px 16px;
  background: #eef4fb;
  color: #1d4f7c;
  border: 1px solid #cfe0ef;
}

.elianto-form-msg--success {
  padding: 12px 16px;
  background: #eafaf0;
  color: #1c6b3e;
  border: 1px solid #bfe8d1;
}

.elianto-form-msg--error {
  padding: 12px 16px;
  background: #fdecec;
  color: #a72a2a;
  border: 1px solid #f3c6c6;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .elianto-row {
    flex-direction: column;
  }
  .elianto-col,
  .elianto-col.sm {
    flex: 1 1 100%;
  }
}
