/* Custom CSS for Baol */

/* Sidebar più compatto */
#nav-sidebar-apps ol a {
    height: 32px;
}

#nav-sidebar-apps h2 {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.04em;
    background: oklch(92.8% .006 264.531 / 0.5);
    border-radius: 0.375rem;
}

.dark #nav-sidebar-apps h2 {
    background: oklch(28% .01 264.531 / 0.45);
    color: oklch(92.8% .006 264.531);
}

/* Descrizione espandibile in lista segnalazioni */
.desc-expand {
    position: relative;
    transition: color 0.15s;
}
.desc-expand:hover {
    color: #1976d2;
    text-decoration: underline dotted;
}

/* Rende visibili e persistenti gli spazi, anche in fondo alla riga,
   negli editor Trix del WysiwygWidget (WhitespaceWidget di Unfold). */
trix-editor {
    white-space: pre-wrap !important;
}

/* Guida utente (/guida/) */
.guida {
    color: var(--base-700, #374151);
    font-size: 0.9375rem;
    line-height: 1.7;
}
.dark .guida {
    color: var(--base-300, #d1d5db);
}
.guida h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--base-200, #e5e7eb);
}
.dark .guida h2 {
    border-bottom-color: var(--base-800, #1f2937);
}
.guida h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
}
.guida h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.4rem;
}
.guida p {
    margin: 0.6rem 0;
}
.guida ul,
.guida ol {
    margin: 0.6rem 0 0.6rem 1.4rem;
}
.guida ul {
    list-style: disc;
}
.guida ol {
    list-style: decimal;
}
.guida li {
    margin: 0.2rem 0;
}
.guida a {
    color: var(--primary-700, #4E90A3);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.guida a:hover {
    color: var(--primary-800, #3D7684);
}
.dark .guida a {
    color: var(--primary-300, #9FD6EA);
}
.guida code {
    background: var(--base-100, #f3f4f6);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}
.dark .guida code {
    background: var(--base-800, #1f2937);
}
.guida pre {
    background: var(--base-100, #f3f4f6);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.8rem 0;
}
.dark .guida pre {
    background: var(--base-800, #1f2937);
}
.guida blockquote {
    border-left: 3px solid var(--primary-600, #5FA9C0);
    background: var(--primary-50, #f0f9fc);
    padding: 0.35rem 1rem;
    margin: 0.8rem 0;
    border-radius: 0 0.375rem 0.375rem 0;
}
.dark .guida blockquote {
    background: var(--base-900, #1b2a30);
}
.guida table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-size: 0.875rem;
}
.guida th,
.guida td {
    border: 1px solid var(--base-200, #e5e7eb);
    padding: 0.4rem 0.6rem;
    text-align: left;
    vertical-align: top;
}
.dark .guida th,
.dark .guida td {
    border-color: var(--base-800, #1f2937);
}
.guida th {
    background: var(--base-100, #f3f4f6);
    font-weight: 600;
}
.dark .guida th {
    background: var(--base-800, #1f2937);
}
.guida hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--base-200, #e5e7eb);
}
.dark .guida hr {
    border-top-color: var(--base-800, #1f2937);
}
.guida img {
    max-width: 100%;
    border: 1px solid var(--base-200, #e5e7eb);
    border-radius: 0.5rem;
    margin: 0.6rem 0;
}
.dark .guida img {
    border-color: var(--base-800, #1f2937);
}
