/* ===================================================================
   Lawoo Docs — Styles für das Docs-Layout (layouts/docs.blade.php)
   Eigenständig neben main.css — wird nur auf /docs-Seiten geladen.
   =================================================================== */

/* Sidebar scrollbars */
.docs-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(8, 145, 178, 0.2) transparent;
}

.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(8, 145, 178, 0.2);
    border-radius: 2px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 145, 178, 0.4);
}

/* Left nav active states */
.docs-nav-link.active {
    color: #0891b2;
    background: rgba(8, 145, 178, 0.08);
    border-left-color: #0891b2;
}

/* -------------------------------------------------------------------
   Akkordeon der linken Navigation
   grid-template-rows 0fr → 1fr animiert die automatische Höhe,
   ohne dass eine feste max-height nötig wäre.
   ------------------------------------------------------------------- */
.docs-section-toggle {
    cursor: pointer;
}

.docs-section-chevron {
    transition: transform 0.25s ease;
}

.docs-section.is-open .docs-section-toggle {
    color: #374151;
}

.docs-section.is-open .docs-section-chevron {
    transform: rotate(180deg);
}

.docs-section-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}

.docs-section.is-open .docs-section-body {
    grid-template-rows: 1fr;
}

/* Innere Hülle schluckt das Padding der Liste, damit eine geschlossene
   Sektion wirklich auf 0 zusammenfährt. */
.docs-section-inner {
    overflow: hidden;
    min-height: 0;
}

/* Ohne JavaScript bleiben alle Sektionen sichtbar */
.no-js .docs-section-body {
    grid-template-rows: 1fr;
}

/* TOC active state */
.toc-link.active {
    color: #0891b2;
    border-left-color: #0891b2;
}

/* -------------------------------------------------------------------
   Prose styling für Doku-Inhalte
   ------------------------------------------------------------------- */
.prose-docs h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #030712;
}

.prose-docs h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #030712;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.prose-docs h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.prose-docs h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.prose-docs p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #4b5563;
}

.prose-docs ul,
.prose-docs ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose-docs li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: #4b5563;
}

.prose-docs ul li {
    list-style-type: disc;
}

.prose-docs ol li {
    list-style-type: decimal;
}

.prose-docs a {
    color: #0891b2;
    text-decoration: none;
    font-weight: 500;
}

.prose-docs a:hover {
    text-decoration: underline;
}

.prose-docs strong {
    font-weight: 600;
    color: #1f2937;
}

.prose-docs code:not(pre code) {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: #dc2626;
}

.prose-docs pre {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.prose-docs pre code {
    font-size: 0.875rem;
    line-height: 1.7;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: #e2e8f0;
}

.prose-docs blockquote {
    border-left: 4px solid #0891b2;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.05) 0%, transparent 100%);
    padding: 1rem 1rem 1rem 1.25rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose-docs table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.prose-docs th,
.prose-docs td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.prose-docs th {
    font-weight: 600;
    color: #1f2937;
    background: #f9fafb;
}

.prose-docs tr:hover td {
    background: #f9fafb;
}

/* -------------------------------------------------------------------
   Info-Boxen (tip / warning / info)
   ------------------------------------------------------------------- */
.info-box {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.info-box.tip {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.info-box.tip .info-icon {
    color: #10b981;
}

.info-box.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.info-box.warning .info-icon {
    color: #f59e0b;
}

.info-box.info {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(8, 145, 178, 0.05) 100%);
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.info-box.info .info-icon {
    color: #0891b2;
}

/* -------------------------------------------------------------------
   Mobile Docs-Sidebar
   ------------------------------------------------------------------- */
.docs-mobile-nav {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.docs-mobile-nav.open {
    transform: translateX(0);
}

/* -------------------------------------------------------------------
   Such-Modal (Cmd/Ctrl+K)
   ------------------------------------------------------------------- */
.docs-search-modal {
    display: none;
}

.docs-search-modal.open {
    display: flex;
}

.docs-search-result.selected {
    background: rgba(8, 145, 178, 0.08);
}

.docs-search-result.selected .docs-search-result-title {
    color: #0891b2;
}

.docs-search-result mark {
    background: rgba(8, 145, 178, 0.15);
    color: #0891b2;
    border-radius: 0.125rem;
    padding: 0 0.125rem;
}
