/* Guida utente — solo estensioni sopra docs.css (stesso shell/TOC/prose). */

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.guida-page .docs-hero__eyebrow {
  color: var(--docs-orange);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 0.85rem;
  text-transform: uppercase;
}

.guida-page .docs-hero h1 {
  max-width: 22ch;
}

/* Steps: niente marker nativi (i numeri arrivano da docs.css ::before). */
.guida-page .docs-steps {
  list-style: none;
  padding-left: 0;
}

.guida-page .docs-bullets {
  color: var(--docs-muted);
  list-style: disc;
  margin: 0.85rem 0 0;
  max-width: var(--docs-measure);
  padding-left: 1.25rem;
}

.guida-page .docs-bullets li {
  font-size: 1rem;
  line-height: 1.65;
  margin-top: 0.45rem;
}

.guida-page .docs-bullets li::marker {
  color: var(--docs-orange);
}

.guida-page .docs-note + .docs-note,
.guida-page .docs-note + .guida-figure,
.guida-page .docs-steps + .docs-note,
.guida-page .docs-bullets + .docs-note {
  margin-top: 1.25rem;
}

.guida-page .docs-note p + p {
  margin-top: 0.55rem;
}

/* Screenshot: stessa misura della prosa, angoli docs. */
.guida-figure {
  background: #fff;
  border: 2px solid var(--docs-line);
  border-radius: 20px;
  box-shadow: 0 18px 50px color-mix(in srgb, #ff5733 8%, transparent);
  margin: 1.5rem 0 0;
  max-width: min(46rem, 100%);
  overflow: hidden;
}

.guida-figure img {
  display: block;
  height: auto;
  width: 100%;
}

.guida-figure figcaption {
  background: var(--docs-cream);
  border-top: 1px solid var(--docs-line);
  color: var(--docs-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  padding: 0.85rem 1.1rem 1rem;
}

.guida-page .docs-section h3 + .docs-steps,
.guida-page .docs-section h3 + .docs-bullets,
.guida-page .docs-section h3 + p {
  margin-top: 0.75rem;
}

@media (max-width: 639px) {
  .guida-figure {
    border-radius: 16px;
  }
}

/* ── Indice: ricerca live ── */
.guida-toc-search-wrap {
  margin: 0 0 0.85rem;
  position: relative;
}

.guida-toc-search {
  background: #fff;
  border: 2px solid var(--docs-line);
  border-radius: 14px;
  font-size: 0.875rem;
  padding: 0.55rem 0.75rem;
  width: 100%;
}

.guida-toc-search:focus {
  border-color: color-mix(in srgb, var(--docs-orange) 55%, var(--docs-line));
  outline: none;
}

.guida-toc-search-wrap[data-empty='true']::after {
  color: var(--docs-muted);
  content: 'Nessun capitolo corrisponde.';
  display: block;
  font-size: 0.8rem;
  margin-top: 0.45rem;
}

/* ── Link copia capitolo ── */
.guida-section-link {
  background: var(--docs-cream);
  border: 1px solid var(--docs-line);
  border-radius: 999px;
  color: var(--docs-muted);
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  margin-left: 0.5rem;
  padding: 0.2rem 0.45rem;
  vertical-align: middle;
}

.guida-section-link:hover,
.guida-section-link:focus-visible {
  border-color: var(--docs-orange);
  color: var(--docs-ink);
}

.guida-section-link.is-copied {
  background: color-mix(in srgb, var(--docs-orange) 12%, #fff);
  color: var(--docs-orange);
}

/* ── Lightbox ── */
html.guida-lightbox-open {
  overflow: hidden;
}

.guida-lightbox {
  align-items: center;
  background: rgba(0, 0, 0, 0.88);
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 200;
}

/* display:flex sopra annullava l’attributo HTML hidden → overlay visibile al load */
.guida-lightbox[hidden] {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

.guida-lightbox:not([hidden]) {
  display: flex;
}

.guida-lightbox__close {
  background: #fff;
  border: none;
  border-radius: 999px;
  color: #000;
  cursor: pointer;
  font-size: 1.75rem;
  height: 2.75rem;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.75rem;
}

.guida-lightbox__figure {
  margin: 0;
  max-height: 92vh;
  max-width: min(56rem, 100%);
}

.guida-lightbox__img {
  display: block;
  height: auto;
  max-height: calc(92vh - 3rem);
  object-fit: contain;
  width: 100%;
}

.guida-lightbox__caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  text-align: center;
}

.guida-figure img {
  cursor: zoom-in;
}

/* ── Torna su ── */
.guida-back-top {
  align-items: center;
  background: var(--docs-orange);
  border: none;
  border-radius: 999px;
  bottom: 1.25rem;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--docs-orange) 35%, transparent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 3rem;
  justify-content: center;
  position: fixed;
  right: 1.25rem;
  width: 3rem;
  z-index: 60;
}

.guida-back-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ── Tabelle stato preventivo ── */
.guida-table-wrap {
  margin-top: 1rem;
  max-width: min(46rem, 100%);
  overflow-x: auto;
}

.guida-table {
  border-collapse: collapse;
  font-size: 0.92rem;
  width: 100%;
}

.guida-table th,
.guida-table td {
  border: 1px solid var(--docs-line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.guida-table th {
  background: var(--docs-cream);
  font-weight: 700;
}

.guida-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--docs-cream) 45%, #fff);
}

/* ── Slot video corso (nascosto finché non c’è il file) ── */
.guida-video-slot[hidden] {
  display: none !important;
}

.guida-video-slot--ready {
  background: #fff;
  border: 2px solid var(--docs-line);
  border-radius: 20px;
  margin: 1.25rem 0 0;
  max-width: min(46rem, 100%);
  overflow: hidden;
  padding: 0.75rem 0.75rem 0.85rem;
}

.guida-video-slot--ready video {
  background: #000;
  border-radius: 12px;
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.guida-video-music-credit {
  color: var(--docs-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0.65rem 0 0;
}

.guida-video-music-credit a {
  color: var(--docs-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guida-credits {
  border-top: 1px solid var(--docs-line);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.guida-credits h3 {
  font-size: 1rem;
  margin: 0 0 0.65rem;
}
