/* ============================================================
   Shared styles for all Elyse deployment documentation pages.
   Each deployment HTML file links to this stylesheet instead of
   duplicating these rules in an inline <style> block.
   ============================================================ */

/* --- Layout: main flex container --- */
#doc-content ul, #doc-content ol {
    margin-left: 2rem;
}

main {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
}

/* --- Sidebar --- */
#doc-sidebar {
    position: sticky;
    top: 60px;
    align-self: flex-start;
    width: 260px;
    min-width: 260px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 1rem 0.75rem;
    border-right: 1px solid #e1e1e1;
    box-sizing: border-box;
}

#doc-sidebar.collapsed > .sidebar-content {
    display: none;
}

#doc-sidebar.collapsed {
    width: auto;
    min-width: auto;
    border-right: none;
    padding: 1rem 0.5rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 5;
    padding: 0.25rem 0;
}

#doc-sidebar h2 {
    font-size: 1rem;
    margin-bottom: 0;
}

#doc-sidebar.collapsed h2 {
    display: none;
}

#sidebar-toggle {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    font-size: 1rem;
    color: #333333;
    line-height: 1;
    flex-shrink: 0;
}

#sidebar-toggle:hover {
    background-color: #e0e0e0;
}

#doc-sidebar ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
    margin-bottom: 0;
}

#doc-sidebar ul li {
    margin-bottom: 0.15rem;
}

#doc-sidebar ul li a {
    text-decoration: none;
    color: #333333;
    font-size: 0.82rem;
    display: block;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

#doc-sidebar ul li a:hover {
    background-color: #f0f0f0;
    color: #0078d4;
}

/* --- Main content area --- */
#doc-content {
    flex: 1;
    min-width: 0;
    padding: 0 3rem;
}

#doc-content h2[id] {
    scroll-margin-top: 80px;
}

/* --- Callout boxes --- */
.note-box {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.critical-box {
    background: #fce4ec;
    border-left: 4px solid #e53935;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

/* --- Tables --- */
.step-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.step-table th, .step-table td {
    border: 1px solid #d0d0d0;
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.step-table th {
    background: #f0f0f0;
    font-weight: 600;
}

.scenario-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.scenario-table th, .scenario-table td {
    border: 1px solid #d0d0d0;
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.scenario-table th {
    background: #f0f0f0;
    font-weight: 600;
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.settings-table th, .settings-table td {
    border: 1px solid #d0d0d0;
    padding: 0.4rem 0.6rem;
    text-align: left;
    vertical-align: top;
}

.settings-table th {
    background: #f0f0f0;
    font-weight: 600;
}

.settings-table td:first-child {
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.85rem;
}

/* --- Checklists --- */
.checklist {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.checklist li {
    padding: 0.2rem 0;
}

.checklist li::before {
    content: "\2610";
    margin-right: 0.4rem;
}

.checklist-done li::before {
    content: "\2611";
    margin-right: 0.4rem;
}

/* --- Architecture / monospace diagrams --- */
.arch-diagram {
    font-family: monospace;
    white-space: pre;
    background: #f8f8f8;
    border: 1px solid #e1e1e1;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    line-height: 1.4;
    margin: 1rem 0;
}

/* --- Code blocks --- */
pre code {
    display: block;
    white-space: pre;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Sidebar navigation sections --- */
.nav-section {
    list-style: none;
    margin-bottom: 0.1rem;
}

.nav-section details {
    margin: 0;
}

.nav-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333333;
    padding: 0.3rem 0.4rem;
    cursor: pointer;
    border-radius: 3px;
    list-style: none;
}

.nav-section-title::-webkit-details-marker {
    display: none;
}

.nav-section-title::before {
    content: "\25B6  ";
    font-size: 0.6rem;
    vertical-align: middle;
}

details[open] > .nav-section-title::before {
    content: "\25BC  ";
}

.nav-section-title:hover {
    background-color: #f0f0f0;
    color: #0078d4;
}

.nav-section-title.current {
    color: #0078d4;
}

.nav-section-title a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.nav-section-title a:hover {
    color: inherit;
}

.nav-subsections {
    list-style: none;
    padding-left: 1rem;
    margin: 0.1rem 0 0.3rem;
}

.nav-subsections li a {
    text-decoration: none;
    color: #555555;
    font-size: 0.78rem;
    display: block;
    padding: 0.12rem 0.4rem;
    border-radius: 3px;
}

.nav-subsections li a:hover {
    background-color: #f0f0f0;
    color: #0078d4;
}

/* --- Troubleshooting items --- */
.troubleshoot-item {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #f9f9f9;
    border-left: 3px solid #999999;
    border-radius: 0 4px 4px 0;
}

.troubleshoot-item p {
    margin: 0.3rem 0;
}

.troubleshoot-item h4 {
    margin-bottom: 0.25rem;
}

/* --- Misc --- */
.doc-link {
    font-weight: 600;
}
