/* documentazione.css — Layout principale manuale Crystal Tokyo */

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ────────────────────────────────────────────────────────── */
html, body {
    height: 100%;
    background-color: #0e1020;
    background-image: url('imgs/documentazione/sfondo_senza_bordino_new.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #8f8f8f;
    font-family: 'DejaVu Serif', Georgia, serif;
    font-size: 15px;
}

/* ── Layout flexbox: sidebar + contenuto ─────────────────────────── */
.doc-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.doc-sidebar {
    width: 300px;
    flex-shrink: 0;
    background-color: rgba(10, 12, 28, 0.96);
    border-right: 1px solid #1a1d35;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Logo in cima alla sidebar */
.doc-logo {
    padding: 16px 12px 12px;
    text-align: center;
    border-bottom: 1px solid #1a1d35;
    flex-shrink: 0;
}

.doc-logo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Menu accordion scrollabile */
.doc-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ── Barra di ricerca in fondo alla sidebar ───────────────────────── */
.doc-search {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid #1a1d35;
    flex-shrink: 0;
    background-color: rgba(10, 12, 28, 0.6);
}

.doc-search input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2a2e50;
    border-radius: 6px;
    padding: 8px 10px;
    color: #ccc;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.doc-search input::placeholder { color: #444; }
.doc-search input:focus { border-color: #ce846f; }

.doc-search button {
    background: rgba(206, 132, 111, 0.12);
    border: 1px solid rgba(206, 132, 111, 0.4);
    border-radius: 6px;
    color: #ce846f;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.doc-search button:hover { background: rgba(206, 132, 111, 0.28); }

/* ── Area contenuto principale ────────────────────────────────────── */
.doc-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    min-width: 0;
}

/* Messaggio iniziale */
.doc-welcome {
    color: #333;
    font-style: italic;
    text-align: center;
    margin-top: 80px;
    font-size: 14px;
}

/* ── Stili testi articoli (output di documentazione_testo.php) ───── */
.titoli {
    font-family: 'DejaVu Serif', Georgia, serif;
    font-size: 16px;
    color: #ce846f;
    text-shadow: 3px 2px 3px #000;
    text-transform: uppercase;
    font-weight: normal;
    background-image: url('imgs/documentazione/barra_titolo.png');
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
    padding: 20px 10px 5px;
}

.testo {
    font-family: 'DejaVu Serif', Georgia, serif;
    font-size: 15px;
    color: #8f8f8f;
    line-height: 1.75;
    text-align: justify;
    padding: 16px 20px;
}

span.look {
    font-size: 13px;
    text-transform: uppercase;
    color: #ce846f;
}

.regola {
    text-transform: uppercase;
    background-color: #000;
    text-align: center;
    padding: 2px;
    font-size: 10px;
}

span.evidenzia {
    font-size: 12px;
    font-style: italic;
    color: #692222;
    text-transform: none;
}

/* ── Risultati ricerca ───────────────────────────────────────────── */
.doc-search-header {
    margin-bottom: 8px;
}

.doc-search-header .titoli em {
    text-transform: none;
    color: #e0a080;
    font-style: normal;
}

.doc-search-results {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    border-top: 1px solid #1a1d35;
}

.doc-search-results li {
    border-bottom: 1px solid #1a1d35;
}

.doc-search-results li a.doc-link {
    display: block;
    padding: 11px 18px;
    color: #8f8f8f;
    font-family: 'DejaVu Serif', Georgia, serif;
    font-size: 13px;
    transition: color 0.2s, background 0.2s, padding-left 0.2s;
}

.doc-search-results li a.doc-link:hover {
    color: #ce846f;
    background: rgba(206, 132, 111, 0.06);
    padding-left: 24px;
}

.doc-search-empty {
    color: #444;
    font-style: italic;
    text-align: center;
    padding: 32px 0;
    font-size: 13px;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar          { width: 5px; background: #111; border-radius: 5px; }
::-webkit-scrollbar-thumb    { background: #2a2a2a; border-radius: 5px; }
::-webkit-scrollbar-track    { background: #111; border-radius: 5px; }

/* ── Responsive: mobile / tablet ─────────────────────────────────── */
@media (max-width: 768px) {
    .doc-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .doc-sidebar {
        width: 100%;
        height: auto;
        max-height: 60vh;
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid #1a1d35;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .doc-nav { flex: none; }

    .doc-content {
        padding: 20px 16px;
        overflow: visible;
        min-height: 50vh;
    }
}
