/* ===================================================================
   Help Center — stile theme-aware (usa le CSS var --ost-* dell'app)
   =================================================================== */

.ost-help-modal .modal-content {
  background: var(--ost-card-bg, #0f172a);
  color: var(--ost-text, #e2e8f0);
  border: 1px solid var(--ost-table-border, #1e293b);
  border-radius: 14px;
}

.ost-help-modal .modal-header {
  border-bottom: 1px solid var(--ost-table-border, #1e293b);
  padding: 14px 18px;
}
.ost-help-modal .modal-title {
  color: var(--ost-title, #E2B04A);
  font-weight: 800;
  letter-spacing: 0.4px;
}

/* Pulsante di chiusura (X) in ORO, visibile su header chiaro e scuro.
   !important + filter:none per battere l'eventuale filtro/tema di Bootstrap che
   rendeva la X scura (invisibile su header scuro). */
.ost-help-modal .btn-close {
  width: 1.1em;
  height: 1.1em;
  opacity: 1 !important;
  filter: none !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 1.1em auto !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E2B04A'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
}
.ost-help-modal .btn-close:hover { opacity: 0.8 !important; }

.ost-help {
  color: var(--ost-text, #e2e8f0);
  padding: 6px 6px 10px;
}

/* --- ricerca --- */
.ost-help-search-wrap { margin: 4px 0 18px; }
.ost-help-search {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--ost-text, #e2e8f0);
  background: var(--ost-surface-soft, rgba(255,255,255,0.04));
  border: 1px solid var(--ost-table-border, #334155);
  border-radius: 999px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ost-help-search:focus {
  border-color: var(--ost-gold, #E2B04A);
  box-shadow: 0 0 0 3px rgba(226,176,74,0.15);
}
.ost-help-search::placeholder { color: var(--ost-muted, #94a3b8); }

/* --- titoli --- */
.ost-help-h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--ost-text, #f8fafc);
  margin: 6px 0 10px;
}
.ost-help-lead {
  font-size: 14px;
  color: var(--ost-muted, #94a3b8);
  margin: 0 0 16px;
}
.ost-help-empty {
  font-size: 13px;
  color: var(--ost-muted, #94a3b8);
  padding: 10px 0;
}

/* --- griglia categorie (home) --- */
.ost-help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 640px) { .ost-help-grid { grid-template-columns: 1fr; } }

.ost-help-card {
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  background: var(--ost-surface-soft, rgba(255,255,255,0.04));
  border: 1px solid var(--ost-table-border, #1e293b);
  border-radius: 12px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .05s ease;
}
.ost-help-card:hover {
  background: var(--ost-surface, rgba(255,255,255,0.07));
  border-color: var(--ost-gold, #E2B04A);
}
.ost-help-card:active { transform: translateY(1px); }
.ost-help-card-title { font-size: 15px; font-weight: 700; color: var(--ost-text, #f1f5f9); }
.ost-help-card-desc { font-size: 12px; color: var(--ost-muted, #94a3b8); margin-top: 4px; }

/* --- sezioni / gruppi / link articolo --- */
.ost-help-section { margin: 4px 0 18px; }
.ost-help-group {
  font-size: 15px;
  font-weight: 700;
  color: var(--ost-text, #f1f5f9);
  margin: 14px 0 6px;
}
.ost-help-link {
  display: block;
  text-align: left;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.ost-help-link:hover { background: var(--ost-surface-soft, rgba(255,255,255,0.05)); }
.ost-help-link-title { display: block; font-size: 14px; font-weight: 600; color: #4f8ef7; }
.ost-help-link-sub { display: block; font-size: 12px; color: var(--ost-muted, #94a3b8); margin-top: 1px; }

/* --- breadcrumb --- */
.ost-help-crumbs { font-size: 13px; margin: 2px 0 10px; display: flex; align-items: center; flex-wrap: wrap; }
.ost-help-crumb-sep { color: var(--ost-muted-2, #64748b); margin: 0 7px; }
.ost-help-crumb-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--ost-text, #e2e8f0); font-size: 13px; font-weight: 700;
}
.ost-help-crumb-link:hover { color: var(--ost-gold, #E2B04A); text-decoration: underline; }
.ost-help-crumb-current { color: var(--ost-muted, #94a3b8); font-size: 13px; }

/* --- markdown --- */
.ost-help-md { color: var(--ost-text, #e2e8f0); font-size: 14px; line-height: 1.6; }
.ost-help-md h1, .ost-help-md h2, .ost-help-md h3 { color: var(--ost-text, #f1f5f9); font-weight: 700; margin: 18px 0 8px; }
.ost-help-md h2 { font-size: 19px; }
.ost-help-md h3 { font-size: 16px; }
.ost-help-md p { margin: 0 0 10px; }
.ost-help-md ul, .ost-help-md ol { margin: 0 0 12px; padding-left: 22px; }
.ost-help-md li { margin: 3px 0; }
.ost-help-md a { color: #4f8ef7; text-decoration: none; }
.ost-help-md a:hover { text-decoration: underline; }
.ost-help-md code {
  background: var(--ost-surface-soft, rgba(255,255,255,0.06));
  border: 1px solid var(--ost-table-border, #334155);
  border-radius: 5px; padding: 1px 5px; font-size: 13px;
}
.ost-help-md strong { color: var(--ost-text, #f8fafc); }
.ost-help-md blockquote {
  border-left: 3px solid var(--ost-gold, #E2B04A);
  margin: 10px 0; padding: 4px 0 4px 14px; color: var(--ost-muted, #94a3b8);
}
.ost-help-md table { border-collapse: collapse; margin: 10px 0; width: 100%; }
.ost-help-md th, .ost-help-md td {
  border: 1px solid var(--ost-table-border, #334155); padding: 6px 10px; font-size: 13px; text-align: left;
}
.ost-help-md th { background: var(--ost-surface-soft, rgba(255,255,255,0.05)); color: var(--ost-text, #f1f5f9); }

/* --- language switch (EN / IT): segmented control moderno, senza bandierine --- */
.ost-help-lang {
  display: inline-flex;
  justify-content: flex-end;
  gap: 2px;
  margin: 0 0 12px auto;      /* allineato a destra */
  padding: 3px;
  background: var(--ost-surface-soft, rgba(255,255,255,0.05));
  border: 1px solid var(--ost-table-border, #334155);
  border-radius: 999px;       /* pill */
  width: max-content;
}
.ost-help-lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ost-muted, #94a3b8);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.ost-help-lang-btn:hover { color: var(--ost-text, #e2e8f0); }
.ost-help-lang-btn.is-active {
  color: #0B1221;
  background: var(--ost-gold, #E2B04A);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.ost-help-lang-btn:focus-visible {
  outline: 2px solid var(--ost-gold, #E2B04A);
  outline-offset: 2px;
}

/* nota di fallback quando una guida non è ancora tradotta */
.ost-help-fallback-note {
  color: var(--ost-muted, #94a3b8); font-size: 12.5px; font-style: italic;
  margin: 0 0 12px;
}
.ost-help-fallback-note blockquote {
  border-left: 3px solid var(--ost-gold, #E2B04A);
  margin: 0; padding: 4px 0 4px 12px;
}
