/* ============================================
   DondeEnsayo — Documentation Styles
   ============================================ */

/* ── Layout ── */
.docs-shell {
    display: flex;
    min-height: calc(100vh - 65px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 0;
}

/* ── Sidebar ── */
.docs-sidebar {
    width: 230px;
    flex-shrink: 0;
    padding: 2.5rem 0 2.5rem 0;
}

.docs-sidebar-inner {
    position: sticky;
    top: 80px;
    padding-right: 1.5rem;
    border-right: 1px solid var(--de-border-light);
}

.docs-sidebar-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--de-muted);
    margin: 1.5rem 0 .5rem;
    padding: 0 .5rem;
}

.docs-sidebar-label:first-child { margin-top: 0; }

.docs-nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .5rem;
    border-radius: 8px;
    font-size: .85rem;
    color: var(--de-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
    line-height: 1.3;
}

.docs-nav-link:hover {
    background: rgba(124, 58, 237, .08);
    color: var(--de-text);
}

.docs-nav-link.active {
    background: rgba(124, 58, 237, .14);
    color: var(--de-primary);
    font-weight: 600;
}

.docs-nav-link .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--de-surface);
    border: 1px solid var(--de-border-light);
    border-radius: 50%;
    font-size: .65rem;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--de-muted);
}

/* ── Content ── */
.docs-content {
    flex: 1;
    min-width: 0;
    padding: 2.5rem 0 4rem 2.5rem;
}

/* ── Hero strip ── */
.docs-hero {
    margin-bottom: 2.5rem;
    padding: 2rem 2rem;
    background: var(--de-card);
    border: 1px solid var(--de-border-light);
    border-radius: var(--de-radius);
    position: relative;
    overflow: hidden;
}

.docs-hero::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--de-gradient);
    border-radius: inherit;
    z-index: 0;
    opacity: .08;
    pointer-events: none;
}

.docs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(124,58,237,.15);
    color: #A78BFA;
    border: 1px solid rgba(124,58,237,.3);
    border-radius: 50px;
    padding: .25rem .75rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .75rem;
    position: relative;
    z-index: 1;
}

.docs-hero h1 {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 .5rem;
    letter-spacing: -.5px;
    position: relative;
    z-index: 1;
}

.docs-hero p {
    color: var(--de-muted);
    font-size: .925rem;
    margin: 0;
    position: relative;
    z-index: 1;
    max-width: 580px;
}

/* ── Section ── */
.docs-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 90px;
}

.docs-section-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.25rem;
}

.docs-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--de-gradient);
    font-size: .85rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.docs-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -.3px;
}

.docs-section-subtitle {
    font-size: .85rem;
    color: var(--de-muted);
    margin: 0;
}

/* ── Steps list ── */
.docs-steps {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    margin-bottom: 1.25rem;
}

.docs-step {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--de-surface);
    border: 1px solid var(--de-border-light);
    border-radius: 12px;
    align-items: flex-start;
}

.docs-step-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: .05rem;
}

.docs-step-body { flex: 1; min-width: 0; }

.docs-step-body strong {
    display: block;
    font-size: .875rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.docs-step-body p {
    font-size: .825rem;
    color: var(--de-muted);
    margin: 0;
    line-height: 1.55;
}

.docs-step-body code {
    background: rgba(124,58,237,.12);
    color: #C4B5FD;
    border-radius: 5px;
    padding: .1em .35em;
    font-size: .8em;
    font-family: 'Menlo', 'Consolas', monospace;
}

/* ── Tip/Note callout ── */
.docs-callout {
    display: flex;
    gap: .75rem;
    padding: .9rem 1rem;
    border-radius: 10px;
    font-size: .825rem;
    line-height: 1.55;
    margin: 1rem 0;
}

.docs-callout-info {
    background: rgba(6, 182, 212, .08);
    border: 1px solid rgba(6, 182, 212, .2);
    color: #67E8F9;
}

.docs-callout-tip {
    background: rgba(34, 197, 94, .07);
    border: 1px solid rgba(34, 197, 94, .2);
    color: #86EFAC;
}

.docs-callout-icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.docs-callout p { margin: 0; color: inherit; }
.docs-callout strong { color: #fff; }

/* ── Screenshot placeholder ── */
.docs-screenshot {
    width: 100%;
    background: var(--de-card);
    border: 1.5px dashed rgba(124,58,237,.35);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 2.5rem 1.5rem;
    margin: 1.25rem 0;
    color: var(--de-muted);
    font-size: .825rem;
    text-align: center;
    min-height: 180px;
}

.docs-screenshot .ph-icon { font-size: 2rem; opacity: .4; }
.docs-screenshot .ph-label { font-weight: 600; color: var(--de-muted); }
.docs-screenshot .ph-desc { font-size: .775rem; opacity: .7; max-width: 320px; }

/* ── Screenshot image — standalone baseline (JS wraps it in .docs-img-frame) ── */
.docs-screenshot-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    object-position: top center;
    display: block;
    border-radius: 12px;
    border: 1.5px solid rgba(124,58,237,.4);
    box-shadow: 0 0 0 4px rgba(124,58,237,.07), 0 8px 30px rgba(0,0,0,.4);
    margin: 1.5rem 0;
    cursor: zoom-in;
    transition: transform .18s ease, box-shadow .18s ease;
}

.docs-screenshot-img:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 0 4px rgba(124,58,237,.2), 0 14px 42px rgba(0,0,0,.5);
}

/* ── Screenshot frame (JS-injected wrapper) ── */
.docs-img-frame {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid rgba(124,58,237,.4);
    box-shadow: 0 0 0 4px rgba(124,58,237,.07), 0 8px 30px rgba(0,0,0,.4);
    cursor: zoom-in;
    transition: transform .18s ease, box-shadow .18s ease;
}

.docs-img-frame:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 0 4px rgba(124,58,237,.22), 0 14px 42px rgba(0,0,0,.5);
}

/* purple gradient accent strip at the top */
.docs-img-frame::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #7C3AED, #A855F7, #6366F1);
}

.docs-img-frame img.docs-screenshot-img {
    margin: 0;
    max-height: 500px;
    object-fit: contain;
    object-position: top center;
    border-radius: 0;
    border: none;
    box-shadow: none;
    cursor: inherit;
    background: var(--de-card);
}

.docs-img-frame img.docs-screenshot-img:hover {
    transform: none;
    box-shadow: none;
}

/* ── Lightbox (native <dialog>) ── */
#docs-lightbox {
    border: none;
    background: transparent;
    padding: 0;
    max-width: 95vw;
    max-height: 95vh;
    outline: none;
    cursor: zoom-out;
}

#docs-lightbox::backdrop {
    background: rgba(6,6,15,.92);
    backdrop-filter: blur(8px);
}

#docs-lightbox img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    border: 1.5px solid rgba(124,58,237,.35);
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    cursor: default;
}

/* ── Divider ── */
.docs-divider {
    border: none;
    border-top: 1px solid var(--de-border-light);
    margin: 2.5rem 0;
}

/* ── Next section card ── */
.docs-next {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--de-card);
    border: 1px solid rgba(124,58,237,.25);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
    margin-top: 2rem;
}

.docs-next:hover {
    border-color: rgba(124,58,237,.5);
    box-shadow: 0 0 0 2px rgba(124,58,237,.1);
}

.docs-next-icon { font-size: 1.75rem; flex-shrink: 0; }
.docs-next-label { font-size: .7rem; color: var(--de-muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: .2rem; }
.docs-next-title { font-size: 1rem; font-weight: 700; color: var(--de-text); margin: 0; }
.docs-next-arrow { margin-left: auto; font-size: 1.25rem; color: var(--de-primary); }

/* ── Mobile ── */
@media (max-width: 768px) {
    .docs-shell {
        flex-direction: column;
        padding: 0;
    }

    .docs-sidebar {
        width: 100%;
        padding: 1rem 1rem 0;
    }

    .docs-sidebar-inner {
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--de-border-light);
        padding-right: 0;
        padding-bottom: 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: .35rem;
    }

    .docs-sidebar-label { display: none; }

    .docs-nav-link {
        font-size: .775rem;
        padding: .3rem .6rem;
    }

    .docs-content {
        padding: 1.5rem 1rem 3rem;
    }

    .docs-hero h1 { font-size: 1.3rem; }
}
