/* =========================================
   ORO & ARGENTO LIVE QUOTE – STYLE COMPLETO
   ========================================= */

.quote-container {
  font-family: Arial, sans-serif;
  color: #000;
  margin-bottom: 40px;
}

.quote-container h3,
.quote-container h4 {
  margin: 0 0 12px;
}

/* --- Layout colonne --- */
.quote-container .row {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.quote-container .col {
  flex: 1;
  min-width: 300px;
}

/* --- Boxes Oro / Argento --- */
.quote-container .box {
  padding: 18px;
  border-radius: 15px;
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quote-container .box.oro {
  background: #ffd500;
}

.quote-container .box.argento {
  background: #e0e0e0;
}

/* --- Tabelle --- */
.quote-container table {
  width: 100%;
  table-layout: fixed !important;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.quote-container th,
.quote-container td {
  padding: 10px 12px;
  border: 1px solid #d4d4d4;
  font-size: 15px;
  vertical-align: middle;
}

.quote-container th {
  background: #f4f4f4;
  text-align: center;
}

.quote-container td:first-child {
  text-align: left;
  font-weight: 600;
}

/* =========================================
   LARGHEZZE COLONNE (definitive)
   ========================================= */

/* Colonna 1: Nome metallo */
.box table tr > *:nth-child(1) {
  width: 40% !important;
}

/* Colonna 2: €/gr */
.box table tr > *:nth-child(2) {
  width: 20% !important;
  text-align: center;
}

/* Colonna 3: input peso */
.box table tr > *:nth-child(3) {
  width: 20% !important;
}

/* Input peso */
.box table input[type="number"],
.box table input[type="text"] {
  width: 85px !important;
  max-width: 85px !important;
  padding: 6px 8px;
}

/* Colonna 4: Bottone CALCOLA */
.box table tr > *:nth-child(4) {
  width: 35% !important; /* ← aumentato per farci stare il bottone */
  text-align: center;
}

/* Bottone */
button.oalq-calcola {
  background: #111;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  width: auto;
}

button.oalq-calcola:hover {
  opacity: 0.85;
}

/* =========================================
   FORM / RISULTATO
   ========================================= */

.form-container {
  margin-top: 40px;
  background: #f7f7f7;
  padding: 20px;
  border-radius: 15px;
  border: 1px solid #e0e0e0;
}

.form-container input,
.form-container select,
.form-container textarea {
  width: 100%;
  padding: 10px;
  margin: 6px 0 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

#oalq-ok,
#oalq-ko {
  margin-top: 12px;
  padding: 10px;
  border-radius: 6px;
  font-weight: bold;
  display: none;
}

#oalq-ok {
  background: #d3f9d8;
  color: #0a7c1e;
}
#oalq-ko {
  background: #ffd4d4;
  color: #7c0a0a;
}

.oalq-result-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  border: 1px solid #000;
  background-color: #ffd500;
}

.oalq-result-box.argento {
  background-color: #ddd;
}

.oalq-btn-small {
  padding: 6px 14px;
  border-radius: 4px;
  background: #eee;
  color: #333;
  border: none;
  cursor: pointer;
}

.oalq-btn-small.primary {
  background-color: #2ecc71;
  color: #fff;
}

/* ============================
   FIX INPUT NON VISIBILI
   ============================ */

.box table input[type="number"],
.box table input[type="text"] {
  width: 80px !important;
  max-width: 80px !important;
  padding: 6px 8px;

  background: #fafafa !important; /* colore leggermente grigio */
  border: 1px solid #999 !important; /* bordo più visibile */
  color: #000 !important;

  border-radius: 4px;
  box-sizing: border-box;
}

.box table td:nth-child(3) {
  background: #ffffff !important;
}

.box table td:nth-child(3):hover {
  background: #f0f0f0 !important;
}

/* FIX DEFINITIVO: bottone CALCOLA forzato sopra Elementor */
.box table button.oalq-calcola,
button.oalq-calcola {
  background: #111 !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 14px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

.oalq-error-banner {
  background: #ffe2e2;
  color: #900;
  border: 1px solid #cc0000;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.oalq-error-banner::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: #cc0000;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: middle;
}
/* =========================================
   FORM QUOTAZIONE — GRID FORZATA (SPECIFICITÀ ALTA)
   ========================================= */

/* =========================================
da caricare direttamente nel TEMA!!
   ========================================= */

#oalq-form-wrapper #oalq-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  width: 100% !important;
}

/* RIGHE 3 colonne */
#oalq-form-wrapper #oalq-form .oalq-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
}

/* RIGHE 2 colonne */
#oalq-form-wrapper #oalq-form .oalq-row-2 {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
}

/* FULL WIDTH */
#oalq-form-wrapper #oalq-form .oalq-row-full {
  width: 100% !important;
  display: block !important;
}

/* Input & Textarea */
#oalq-form-wrapper #oalq-form input,
#oalq-form-wrapper #oalq-form textarea {
  width: 100% !important;
  padding: 12px !important;
  border: 1px solid #ccc !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

/* =========================================
   ETICHETTE DEI 3 CAMPI DI RIEPILOGO
   ========================================= */

#oalq-form-wrapper #oalq-form .oalq-row:nth-child(3) input::before,
#oalq-form-wrapper #oalq-form .oalq-row:nth-child(3) input {
  position: relative !important;
}

#oalq-form-wrapper
  #oalq-form
  .oalq-row:nth-child(3)
  input[placeholder="Metallo"]::placeholder {
  content: "Metallo" !important;
}

#oalq-form-wrapper
  #oalq-form
  .oalq-row:nth-child(3)
  input[placeholder="Peso (gr)"]::placeholder {
  content: "Peso (gr)" !important;
}

#oalq-form-wrapper
  #oalq-form
  .oalq-row:nth-child(3)
  input[placeholder="Quota €"]::placeholder {
  content: "Quota €" !important;
}

/* In alternativa, se vuoi vere LABEL sobrie: */
#oalq-form-wrapper #oalq-form .oalq-row label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #666 !important;
  margin-bottom: 4px !important;
  display: block !important;
}

/* =========================================
   PRIVACY — FIX DEFINITIVO
   ========================================= */

#oalq-form-wrapper #oalq-form label[style*="flex"],
#oalq-form-wrapper #oalq-form label.oalq-privacy {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 10px !important;
}

#oalq-form-wrapper #oalq-form label input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
}

#oalq-form-wrapper #oalq-form label span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 15px !important;
  color: #333 !important;
}

#oalq-form-wrapper #oalq-form label span a {
  color: #0073aa !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

#oalq-form-wrapper #oalq-form label span a:hover {
  text-decoration: underline !important;
}

/* MOBILE */
@media (max-width: 768px) {
  #oalq-form-wrapper #oalq-form .oalq-row,
  #oalq-form-wrapper #oalq-form .oalq-row-2 {
    grid-template-columns: 1fr !important;
  }

  #oalq-form-wrapper #oalq-form label[style*="flex"],
  #oalq-form-wrapper #oalq-form label.oalq-privacy {
    justify-content: flex-start !important;
  }
}

/* =========================================
   FORZA LE RIGHE A 2 COLONNE (solo 2ª e 3ª riga)
   ========================================= */

/* 2ª RIGA (Nome + Email) */
#oalq-form-wrapper #oalq-form .oalq-row:nth-of-type(2) {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
}

/* 3ª RIGA (Telefono + Città) */
#oalq-form-wrapper #oalq-form .oalq-row:nth-of-type(3) {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
}

@media (max-width: 768px) {
  #oalq-form-wrapper #oalq-form .oalq-row:nth-of-type(2),
  #oalq-form-wrapper #oalq-form .oalq-row:nth-of-type(3) {
    grid-template-columns: 1fr !important;
  }
}

/* FISSA LA COLONNA PESO */
.quote-container table tr > td:nth-child(3),
.quote-container table tr > th:nth-child(3) {
  width: 110px !important;
  max-width: 110px;
}

/* RIDUCE IL PADDING SOLO DELLA COLONNA PESO */
.quote-container table tr > td:nth-child(3) {
  padding: 6px !important;
}

/* BLOCCA L’INPUT DENTRO LA CELLA */
.quote-container .oalq-peso-input {
  width: 70px;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
}

/* ================================
   CENTRA TUTTI I CONTENUTI TABELLA
   (TRANNE LA PRIMA COLONNA)
   ================================ */

/* Tutte le celle: centro verticale */
.quote-container table th,
.quote-container table td {
  vertical-align: middle !important;
}

/* Tutte le colonne TRANNE la prima: centro orizzontale */
.quote-container table td:not(:first-child),
.quote-container table th:not(:first-child) {
  text-align: center !important;
}

/* Prima colonna (nome metallo) resta a sinistra */
.quote-container table td:first-child {
  text-align: left !important;
}

/* Input peso centrato */
.quote-container table td:nth-child(3) input {
  display: block !important;
  margin: 0 auto !important;
  text-align: center !important;
}

/* Bottone CALCOLA centrato */
.quote-container table td:nth-child(4) button {
  display: block !important;
  margin: 0 auto !important;
}
