/*
 * ABM Tickets by AB Media - https://www.abmedia.it
 * Pagine pubbliche: biglietteria e ordine. I colori principali arrivano dalle opzioni del componente.
 */
.abmt {
  --abmt-bg: #f3f5f8;
  --abmt-bg-2: #e9edf3;
  --abmt-surface: #ffffff;
  --abmt-ink: #1b2230;
  --abmt-muted: #5c6677;
  --abmt-primary: #1e3a5f;
  --abmt-primary-2: #4b6180;
  --abmt-success: #198754;
  --abmt-success-2: #146c45;
  --abmt-accent: #f59e0b;
  --abmt-danger: #d6452c;
  --abmt-line: #d9dee7;
  --abmt-radius: 16px;
  --abmt-shadow: 0 1px 2px rgba(27, 34, 48, .06), 0 8px 24px rgba(27, 34, 48, .07);
  color: var(--abmt-ink);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 48px;
  box-sizing: border-box;
}
.abmt *, .abmt *::before, .abmt *::after { box-sizing: border-box; }
.abmt [hidden] { display: none !important; }

/* Testata */
.abmt-hero {
  position: relative;
  background: linear-gradient(160deg, var(--abmt-primary) 0%, var(--abmt-primary-2) 100%);
  color: #fff;
  border-radius: 0 0 var(--abmt-radius) var(--abmt-radius);
  padding: 36px 24px 44px;
  margin: 0 -16px 28px;
  overflow: hidden;
}
.abmt-hero::after {
  /* bordo ondulato */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 22px;
  background: radial-gradient(ellipse at 50% 0, transparent 70%, var(--abmt-bg) 71%) 0 0 / 60px 22px repeat-x;
  opacity: .9;
}
.abmt-hero-small { padding: 26px 24px 36px; }
.abmt-eyebrow {
  margin: 0 0 6px;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--abmt-accent);
  font-weight: 700;
}
.abmt-title {
  margin: 0;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  color: #fff;
}
.abmt-intro { margin-top: 12px; max-width: 64ch; opacity: .95; }
.abmt-intro p:last-child { margin-bottom: 0; }
.abmt-intro a { color: #fff; }
.abmt-status-line { margin: 8px 0 0; opacity: .9; }
.abmt-stripes {
  position: absolute;
  top: 0; right: 0;
  display: flex;
  height: 100%;
  transform: skewX(-18deg) translateX(30px);
  opacity: .85;
}
.abmt-stripes span { width: 14px; height: 100%; }
.abmt-stripes span:nth-child(1) { background: var(--abmt-accent); }
.abmt-stripes span:nth-child(2) { background: rgba(255, 255, 255, .35); }
.abmt-stripes span:nth-child(3) { background: rgba(255, 255, 255, .15); }

/* Layout */
.abmt-layout { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .abmt-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .abmt-summary { position: sticky; top: 16px; }
}
.abmt-main { counter-reset: abmtstep; display: grid; gap: 22px; min-width: 0; }

.abmt-step {
  background: var(--abmt-surface);
  border-radius: var(--abmt-radius);
  padding: 20px;
  box-shadow: var(--abmt-shadow);
  counter-increment: abmtstep;
}
.abmt-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 1.2rem;
}
.abmt-step-title::before {
  content: counter(abmtstep);
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--abmt-success);
  color: #fff;
  font-size: .95rem;
  flex: none;
}
.abmt-hint { color: var(--abmt-muted); font-size: .9rem; margin: 10px 0 0; }

/* Prodotti */
.abmt-products { display: grid; gap: 14px; }
@media (min-width: 640px) { .abmt-products { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.abmt-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 2px solid var(--abmt-line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.abmt-card.is-selected { border-color: var(--abmt-success); box-shadow: 0 0 0 3px rgba(31, 138, 76, .15); }
.abmt-card.has-promo { background: linear-gradient(180deg, #fff7e6 0%, #fff 60%); }
.abmt-card.is-soldout { opacity: .6; }
.abmt-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.abmt-chip {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--abmt-bg-2);
  color: var(--abmt-primary);
}
.abmt-chip-camp { background: #e3f4ea; color: var(--abmt-success); }
.abmt-chip-info { background: #e8eef6; color: var(--abmt-primary-2); }
.abmt-card-title { margin: 2px 0 0; font-size: 1.15rem; line-height: 1.25; }
.abmt-card-desc { color: var(--abmt-muted); font-size: .92rem; }
.abmt-card-desc p { margin: 0 0 .4em; }
.abmt-card-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.abmt-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.abmt-price-now { font-size: 1.45rem; font-weight: 800; color: var(--abmt-ink); }
.abmt-price-old { color: var(--abmt-muted); }
.abmt-promo {
  flex-basis: 100%;
  font-size: .8rem;
  font-weight: 700;
  color: #8a5a00;
}
.abmt-soldout {
  font-weight: 800;
  color: var(--abmt-danger);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.abmt-scarce { margin: 0; font-size: .82rem; color: var(--abmt-danger); font-weight: 600; }

.abmt-qty {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--abmt-line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.abmt-qty-btn {
  width: 42px; height: 42px;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--abmt-primary);
  cursor: pointer;
}
.abmt-qty-btn:hover { background: var(--abmt-bg); }
.abmt-qty-btn:disabled { color: #c3cad5; cursor: default; background: transparent; }
.abmt-qty input {
  width: 44px; height: 42px;
  border: 0;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  background: transparent;
  color: var(--abmt-ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.abmt-qty input::-webkit-outer-spin-button,
.abmt-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Intestatari */
.abmt-holder-group { border: 0; padding: 0; margin: 0 0 16px; }
.abmt-holder-group legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.abmt-holder-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--abmt-bg);
  margin-bottom: 8px;
}
@media (min-width: 640px) {
  .abmt-holder-row { grid-template-columns: 110px 1fr; align-items: center; }
  .abmt-holder-row.has-plate { grid-template-columns: 110px 1fr 160px; }
}
.abmt-holder-num { font-size: .85rem; font-weight: 700; color: var(--abmt-primary); }

/* Campi */
.abmt-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .abmt-grid { grid-template-columns: 1fr 1fr; } .abmt-span-2 { grid-column: span 2; } }
.abmt-field { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.abmt input[type="text"], .abmt input[type="email"], .abmt input[type="tel"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid var(--abmt-line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  color: var(--abmt-ink);
}
.abmt input[type="text"]:focus, .abmt input[type="email"]:focus, .abmt input[type="tel"]:focus,
.abmt-qty input:focus { outline: 3px solid rgba(31, 111, 139, .35); outline-offset: 1px; border-color: var(--abmt-primary-2); }
.abmt input.is-invalid { border-color: var(--abmt-danger); }

/* Pagamento */
.abmt-methods { display: grid; gap: 10px; }
.abmt-method {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 2px solid var(--abmt-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.abmt-method:has(input:checked) { border-color: var(--abmt-success); background: #f2faf5; }
.abmt-method input { margin-top: 4px; accent-color: var(--abmt-success); width: 18px; height: 18px; }
.abmt-method-body { display: grid; gap: 2px; }
.abmt-method-body small { color: var(--abmt-muted); }

/* Riepilogo */
.abmt-summary-box {
  background: var(--abmt-surface);
  border-radius: var(--abmt-radius);
  padding: 20px;
  box-shadow: var(--abmt-shadow);
  border-top: 6px solid var(--abmt-accent);
}
.abmt-summary-title { margin: 0 0 12px; font-size: 1.1rem; }
.abmt-lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.abmt-lines li { display: flex; justify-content: space-between; gap: 12px; }
.abmt-lines li span:last-child { white-space: nowrap; font-weight: 600; }
.abmt-line-empty { color: var(--abmt-muted); }
.abmt-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-top: 2px dashed var(--abmt-line);
  margin-bottom: 12px;
}
.abmt-total strong { font-size: 1.5rem; }
.abmt-check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; margin-bottom: 10px; }
.abmt-check input { margin-top: 3px; accent-color: var(--abmt-success); width: 18px; height: 18px; flex: none; }
.abmt-check a { color: var(--abmt-primary-2); }
.abmt-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--abmt-success);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  margin-top: 6px;
  transition: background .15s, transform .05s;
}
.abmt-submit:hover:not(:disabled) { background: var(--abmt-success-2); }
.abmt-submit:active:not(:disabled) { transform: translateY(1px); }
.abmt-submit:disabled { background: #aeb6c2; cursor: not-allowed; }
.abmt-submit-inline { width: auto; padding: 0 24px; margin: 6px 8px 0 0; }
.abmt-secure { margin: 10px 0 0; font-size: .8rem; color: var(--abmt-muted); text-align: center; }
.abmt-form-error, .abmt-alert {
  background: #fdecea;
  color: #8f2a1a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .9rem;
  margin: 8px 0;
}
.abmt-empty { background: var(--abmt-surface); border-radius: var(--abmt-radius); padding: 32px; text-align: center; box-shadow: var(--abmt-shadow); }

/* Pagina ordine */
.abmt-panel {
  background: var(--abmt-surface);
  border-radius: var(--abmt-radius);
  padding: 20px;
  box-shadow: var(--abmt-shadow);
  margin-bottom: 18px;
}
.abmt-panel > p:first-child { margin-top: 0; }
.abmt-panel-ok { border-left: 6px solid var(--abmt-success); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.abmt-panel-ok p { margin: 0; }
.abmt-status-pending .abmt-hero, .abmt-status-awaiting_transfer .abmt-hero, .abmt-status-awaiting_approval .abmt-hero {
  background: linear-gradient(160deg, #6b4e10 0%, #a87a12 100%);
}
.abmt-status-expired .abmt-hero, .abmt-status-cancelled .abmt-hero, .abmt-status-refunded .abmt-hero {
  background: linear-gradient(160deg, #3d4451 0%, #5c6677 100%);
}
.abmt-bank { display: grid; gap: 0; margin: 14px 0; background: var(--abmt-bg); border-radius: 12px; overflow: hidden; }
.abmt-bank > div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--abmt-line); }
.abmt-bank > div:last-child { border-bottom: 0; }
.abmt-bank dt { color: var(--abmt-muted); font-size: .85rem; }
.abmt-bank dd { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; word-break: break-all; }
.abmt-print {
  border: 2px solid var(--abmt-primary-2);
  background: #fff;
  color: var(--abmt-primary-2);
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.abmt-tickets { display: grid; gap: 16px; margin-bottom: 12px; }
@media (min-width: 860px) { .abmt-tickets { grid-template-columns: 1fr 1fr; } }
.abmt-ticket {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px dashed var(--abmt-line);
  border-radius: 16px;
  padding: 18px;
  break-inside: avoid;
}
.abmt-ticket::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 6px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(var(--abmt-success) 33%, var(--abmt-accent) 33% 66%, var(--abmt-danger) 66%);
}
.abmt-ticket-info { min-width: 0; padding-left: 6px; }
.abmt-ticket-info p { margin: 0; }
.abmt-ticket-type { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--abmt-primary-2); font-weight: 700; }
.abmt-ticket-holder { font-size: 1.2rem; font-weight: 800; margin: 4px 0 !important; overflow-wrap: anywhere; }
.abmt-ticket-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1rem; letter-spacing: .06em; }
.abmt-ticket-pitch { margin-top: 6px !important; font-weight: 700; color: var(--abmt-success); }
.abmt-ticket-meta { font-size: .85rem; color: var(--abmt-muted); margin-top: 2px !important; }
.abmt-ticket-qr { width: 132px; height: 132px; flex: none; background: #fff; }
@media (min-width: 480px) { .abmt-ticket-qr { width: 160px; height: 160px; } }

@media print {
  .abmt-hero, .abmt-print, .abmt-recap, .abmt-panel { box-shadow: none !important; }
  .abmt-hero { background: none !important; color: #000; border-bottom: 2px solid #000; }
  .abmt-hero .abmt-title { color: #000; }
  .abmt-stripes, .abmt-hero::after, .abmt-print, .abmt-retry { display: none !important; }
  .abmt-tickets { grid-template-columns: 1fr 1fr; }
}
.abmt-order .abmt-tickets + .abmt-hint { margin: 0 0 18px; }

/* Sezioni e servizi (1.2) */
.abmt-banner {
  background: #e8eef6;
  color: var(--abmt-primary);
  border-left: 6px solid var(--abmt-primary-2);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 18px;
  font-weight: 600;
}
.abmt-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.abmt-tabs a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--abmt-bg);
  color: var(--abmt-primary);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}
.abmt-tabs a:hover { background: var(--abmt-bg-2); }
.abmt-section + .abmt-section { margin-top: 26px; }
.abmt-section { scroll-margin-top: 16px; }
.abmt-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--abmt-primary-2);
}
.abmt-price-unit, .abmt-price-note { font-size: .82rem; color: var(--abmt-muted); }
.abmt-price-note { flex-basis: 100%; }
.abmt-price-quote { font-size: 1.15rem; color: var(--abmt-primary); }

.abmt-days { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.abmt-days legend { font-size: .82rem; font-weight: 700; color: var(--abmt-muted); margin-bottom: 6px; padding: 0; width: 100%; }
.abmt-day { position: relative; display: inline-flex; flex-direction: column; align-items: center; cursor: pointer; }
.abmt-day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.abmt-day span {
  display: block;
  min-width: 64px;
  padding: 7px 10px;
  border: 2px solid var(--abmt-line);
  border-radius: 10px;
  background: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.abmt-day small { font-size: .7rem; color: var(--abmt-danger); margin-top: 2px; }
.abmt-day input:checked + span { border-color: var(--abmt-success); background: #f2faf5; color: var(--abmt-success); }
.abmt-day input:focus-visible + span { outline: 3px solid rgba(31, 111, 139, .35); outline-offset: 1px; }
.abmt-day.is-full { cursor: not-allowed; }
.abmt-day.is-full span { opacity: .45; text-decoration: line-through; }

.abmt-details { margin-top: 6px; }
.abmt textarea, .abmt select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--abmt-line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  color: var(--abmt-ink);
}
.abmt select { min-height: 44px; }
.abmt textarea:focus, .abmt select:focus { outline: 3px solid rgba(31, 111, 139, .35); outline-offset: 1px; border-color: var(--abmt-primary-2); }

@media (min-width: 640px) {
  .abmt-holder-row.abmt-for-row { grid-template-columns: 110px 1fr; }
  .abmt-holder-row.abmt-for-row .abmt-for-code { grid-column: 2; }
}

.abmt-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.abmt-add { text-decoration: none; background: var(--abmt-success); border-color: var(--abmt-success); color: #fff; }
.abmt-add:hover { background: var(--abmt-success-2); color: #fff; }
.abmt-panel-quote { border-left: 6px solid var(--abmt-accent); }
.abmt-ticket.is-supplement { border-style: solid; background: var(--abmt-bg); }
.abmt-status-awaiting_quote .abmt-hero { background: linear-gradient(160deg, #6b4e10 0%, #a87a12 100%); }

/* Credito del produttore (si spegne da Opzioni > Aspetto) */
.abmt-credit { margin: 28px 0 0; text-align: center; font-size: .78rem; color: var(--abmt-muted); opacity: .8; }
.abmt-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media print { .abmt-credit { display: none; } }
