/* uploadhub/form.css */
/* Palette + stati ad alto contrasto */
:root{
  --uh-accent:#5aa2ff;
  --uh-err:#ffffff;              /* testo su errore */
  --uh-err-bg:#b00020;           /* sfondo errore alto contrasto */
  --uh-err-br:#7a0016;

  --uh-ok:#ffffff;               /* testo su ok */
  --uh-ok-bg:#12634a;            /* sfondo ok alto contrasto */
  --uh-ok-br:#0d4a38;

  --uh-info:#0b3d91;             /* testo info */
  --uh-info-bg:#eef4ff;          /* sfondo info */
  --uh-info-br:#c9d7ff;

  --uh-field-border:#ccd2da;
  --uh-field-focus:#5aa2ff33;
  --uh-help:#6a7785;
}

/* Contenitore modulo */
#uh-wrap { max-width:700px; display:grid; gap:12px; margin:0 auto; }
#uh-wrap, #uh-wrap *{ box-sizing:border-box; }
.uh-field { display:grid; gap:6px; }
.uh-input, .uh-check { font:inherit; }
.uh-input{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--uh-field-border);
  border-radius:10px;
  transition:border-color .12s ease, box-shadow .12s ease;
  background:#0e1421;            /* campo scuro */
  color:#eaeef3;                  /* testo chiaro */
}
.uh-input::placeholder{ color:#9aa7b2; }
.uh-input:focus{ outline:none; box-shadow:0 0 0 2px var(--uh-field-focus); }
.uh-input.is-bad{ border-color:#e03131; box-shadow:0 0 0 2px rgba(224,49,49,.25); }

.uh-row { display:grid; gap:10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.uh-field{ min-width:0; }
@media (max-width:640px){ .uh-row{ grid-template-columns:1fr; } }

.uh-btn{
  padding:10px 14px;
  border:0; border-radius:10px; cursor:pointer;
  background:#1d2433; color:#eaeef3;
}
.uh-btn.primary{ background:var(--uh-accent); color:#fff; }
.uh-btn[disabled]{ opacity:.6; cursor:not-allowed; }

/* Dropzone */
#uh-drop{
  border:2px dashed var(--uh-accent);
  border-radius:12px; padding:22px; text-align:center;
  background:#0e1421; color:#eaeef3;
}
#uh-drop.drag{ background:rgba(90,162,255,.08); }
#uh-drop.is-bad{ animation: uh-shake .25s linear; border-color:#e03131; }

/* File picker */
#uh-file{ display:none; }

/* Progress */
#uh-prog{ width:100%; height:10px; background:#111624; border-radius:8px; overflow:hidden; display:none; }
#uh-bar{ height:100%; width:0; background:var(--uh-accent); transition:width .1s linear; }

/* Output server (log) */
#uh-out{
  display:none;
  white-space:pre-wrap;
  font-size:12px;
  background:#0e1421;
  color:#eaeef3;
  padding:10px; border-radius:10px; border:1px solid #1d2433;
}
#uh-out.ok{
  background:var(--uh-ok-bg);
  color:var(--uh-ok);
  border-color:var(--uh-ok-br);
}
#uh-out.error{
  background:var(--uh-err-bg);
  color:var(--uh-err);
  border-color:var(--uh-err-br);
}

/* Coda file */
#uh-queue{
  display:none;
  font-size:13px;
  background:#0e1421; color:#eaeef3;
  border:1px solid #1d2433; border-radius:10px; padding:8px 10px;
}
#uh-queue ul{ margin:6px 0 0; padding-left:18px; }
#uh-queue li.bad{ color:#ffb4b4; }

/* Testi di aiuto */
.uh-help{ font-size:12px; color:var(--uh-help); }
.uh-bad{ color:#ff8080; font-weight:600; }

/* Alert bar sticky (unico punto per avvisi) */
#uh-alertbar{
  position:fixed; left:0; right:0; bottom:0; z-index:9999;
  display:none; padding:12px 14px;
  border-top:1px solid; box-shadow:0 -6px 12px rgba(0,0,0,.25);
  font-size:15px; line-height:1.4;
}
#uh-alertbar.show{ display:flex; gap:10px; align-items:center; justify-content:space-between; }
#uh-alertbar .msg{ flex:1; }
#uh-alertbar .close{
  background:transparent; border:1px solid #2a3b57; border-radius:10px;
  padding:6px 10px; cursor:pointer; color:#eaeef3;
}

/* Stati alert: alto contrasto */
#uh-alertbar.ok{
  background:var(--uh-ok-bg);
  color:var(--uh-ok);
  border-color:var(--uh-ok-br);
}
#uh-alertbar.err{
  background:var(--uh-err-bg);
  color:var(--uh-err);
  border-color:var(--uh-err-br);
}
#uh-alertbar.info{
  background:#0e1421;
  color:#eaeef3;
  border-color:#1d2433;
}

/* Padding per non far coprire il CTA */
.uh-alert-padding{ padding-bottom:68px; }

/* Honeypot */
.uh-honey{ position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; overflow:hidden !important; opacity:0 !important; pointer-events:none !important; }

/* Centratura in Elementor */
#uh-wrap{ width:100%; margin-left:auto !important; margin-right:auto !important; text-align:left; }
.elementor .elementor-widget-container #uh-wrap{ margin-left:auto !important; margin-right:auto !important; }
#uh-wrap h2, #uh-wrap p, #uh-wrap label, #uh-wrap .uh-help{ text-align:left !important; color:#eaeef3; }

/* “Installa app” ad alto contrasto */
#uh-install-wrap{ display:none; margin-top:6px; }
@media (max-width:1024px){ #uh-install-wrap{ display:block; } }
@media (hover:none) and (pointer:coarse){ #uh-install-wrap{ display:block; } }
#uh-install-wrap a#uh-install{
  display:inline-block; padding:10px 14px; border-radius:10px;
  background:#69adff; color:#0b0e14 !important; text-decoration:none;
  border:1px solid #3a4f6e; font-weight:600; line-height:1; box-shadow:0 2px 6px rgba(0,0,0,.25);
}
#uh-install-wrap a#uh-install:hover{ filter:brightness(0.95); }
#uh-install-wrap a#uh-install:active{ transform:translateY(1px); }
#uh-install-wrap a#uh-install:focus-visible{
  outline:3px solid rgba(90,162,255,.45); outline-offset:3px;
}

/* Shake */
.shake{ animation: uh-shake .25s linear; }
@keyframes uh-shake{
  0%{ transform:translateX(0) } 25%{ transform:translateX(-3px) }
  50%{ transform:translateX(3px) } 75%{ transform:translateX(-2px) }
  100%{ transform:translateX(0) }
}
/* === OVERRIDE CONTRASTO ALTO PER RIQUADRO ESITO (#uh-out) === */
#uh-wrap #uh-out{
  display:block !important;                 /* se già visibile */
  background:#0e1421 !important;            /* scuro di default */
  color:#eaeef3 !important;
  border:1px solid #1d2433 !important;
}

/* Esito OK (verde scuro + testo bianco) */
#uh-wrap #uh-out.ok{
  background:#12634a !important;
  color:#ffffff !important;
  border-color:#0d4a38 !important;
}

/* Esito ERRORE (rosso scuro + testo bianco) */
#uh-wrap #uh-out.error{
  background:#b00020 !important;
  color:#ffffff !important;
  border-color:#7a0016 !important;
}
/* === OVERRIDE: CTA "Invia i file" full-width e grande === */
#uh-wrap #uh-send{
  display: block !important;
  width: 100% !important;
  padding: 14px 18px !important;   /* più alto e comodo al tocco */
  font-size: 16px !important;      /* leggibile su mobile */
  line-height: 1.2 !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
}

#uh-wrap #uh-send[disabled]{
  opacity: .65 !important;
  cursor: not-allowed !important;
}

/* (facoltativo) margine sopra/sotto per distanziarlo meglio dai campi */
#uh-wrap #uh-cta-wrap { gap: 10px !important; }
/* === CTA "Invia i file" full-width e grande (anche dentro CSS Grid) === */
#uh-wrap #uh-send{
  display:block !important;
  width:100% !important;
  justify-self:stretch !important;   /* <- fondamentale in CSS Grid */
  align-self:center !important;
  padding:14px 18px !important;
  font-size:16px !important;
  line-height:1.2 !important;
  border-radius:12px !important;
  box-sizing:border-box !important;
}

#uh-wrap #uh-send[disabled]{
  opacity:.65 !important;
  cursor:not-allowed !important;
}

/* spaziatura del contenitore CTA */
#uh-wrap #uh-cta-wrap{ gap:10px !important; }

/* forza full-width anche contro override esterni */
#uh-wrap #uh-cta-wrap #uh-send.uh-btn.primary,
#uh-wrap #uh-send.uh-btn.primary {
  display:block !important;
  width:100% !important;
  padding:14px 18px !important;
  font-size:16px !important;
  line-height:1.2 !important;
  border-radius:12px !important;
  box-sizing:border-box !important;
}
