﻿:root {
    color-scheme: dark !important;
}

.footer {
    display: none;
    visibility: hidden;
}

.dashboard-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #212529;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Remove flex-shrink to allow natural sizing */
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: calc(100vw - 250px);
    /* 250px sidebar + ~16px scrollbar */
    transition: max-width 0.3s ease;
}

@media (max-width: 767.98px) {
    .main-content {
        max-width: 100vw;
    }
}

.admin-collapse ul>li {
    padding: 0 !important;
    margin-bottom: 2px !important;
}

.bg-light1 {
    background-color: #ebedef !important;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 45px;
    border-bottom: 1px solid rgba(200, 200, 200, 0.2);
}

.page-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    height: 0;
    /* Ensures it fills remaining space inside flex column */
}

.nav-link1 {
    color: #adb5bd !important;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link1:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link1.active {
    color: #ffffff !important;
    background-color: #495057;
    font-weight: 500;
}


.nav-link-account {
    color: #495057;
    /* muted gray for inactive account link */
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link-account:hover {
    color: black;
    /* bright on hover */
    background-color: rgba(255, 255, 255, 0.1);
    /* subtle hover effect */
}

.swal2-toast.colored-toast {
    background-color: #1b2234 !important;
    color: #ffffff !important;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.swal2-toast.colored-toast .swal2-title {
    font-weight: 400 !important;
}


.is-invalid {
    border-color: #dc3545;
    /* red border */
    background-color: #f8d7da;
    /* light red background */
    color: #721c24;
    /* dark red text */
}

/*  Markup */
.container2 {
    /* overflow-y: hidden; */
}

.doc-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin-top: 20px;
}

.doc-content {
    max-width: 100%;
    margin-left: 1.0em;
    margin-right: 0;
    transition: max-width 0.3s ease;
    font-size: 1.13rem;
    line-height: 1.8;
    /* or 200% */
}

.doc-content li {
    line-height: 1.7;
    padding-bottom: 0.8rem;
}

.doc-content h1 {
    line-height: 1.3;
    margin-bottom: 0.5em;
}

.doc-content h2 {
    margin-top: 1.0em;
    margin-bottom: 0.5em;
}

.doc-content pre {
    background: #f4f4f4;
    padding: 1em;
}

.doc-content .note {
    background: #e0f7fa;
    padding: 1em;
    border-left: 4px solid #00acc1;
}

.toc-sidebar {
    flex: 0 0 auto;
    width: auto;
    max-width: 300px;
    min-width: 250px;
    position: fixed;
    top: 100px;
    right: 40px;
    margin-left: 24px;
    max-height: calc(100vh - 60px);
    /* Limit height to viewport */
    overflow-y: auto;
    /* Enable vertical scrolling */
    padding-right: 0.5rem;
    /* Optional: prevent scrollbar overlap */
    scroll-padding-top: 60px;
    line-height: 1.4 !important;
}

.toc-sidebar h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}

.toc-sidebar ul {
    list-style: none;
    padding-left: 0;
}

.toc-sidebar a {
    display: block;
    padding: 0px 10px;
    margin-top: 2px;
    margin-bottom: 2px;
    color: #444;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toc-sidebar a.active {
    color: #0078D4;
    font-weight: 600;
    border-left-color: #0078D4;
    background-color: transparent;
    border-radius: 0;
}

.toc-sidebar a:hover {
    /* background-color: #f0f0f0; */
    /* border-left-color: #ccc; */
    text-decoration: underline;
    color: #0078D4;
}

details summary {
    display: inline-block;
}

details summary a {
    display: inline;
}

.toc-back-to-top {
    margin-top: 1em !important;
    display: block;
    color: #1a1a1c !important;
}

.toastui-editor-toolbar-icon.tip-icon::before {
    content: '💡';
    /* Or use FontAwesome */
    font-size: 16px;
}

img {
    max-width: 100%;
    /*    height: auto;
*/
    margin-top: 20px;
    margin-bottom: 15px;
}

@media (min-width: 992px) {
    .doc-content {
        max-width: calc(100% - 300px);
        /* 220px sidebar + 40px right gap */
        margin-right: auto;
    }
}

@media (max-width: 991.98px) {
    .toc-sidebar {
        display: none;
    }
}

/* Dark theme */
/* body */
.bg-light1 {
    background-color: #0d1117 !important;
    color: #ddd !important;
}

/* navbar */
.bg-light {
    background-color: #161c23 !important;
}

.page-body1 pre {
    background-color: #232323;
    color: #ddd;
    border: 1px solid #303030;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    font-family: Consolas, Monaco, 'Courier New', monospace !important;
}

.page-body1 code {
    color: #e0e0e0;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}


.toc-sidebar a {
    color: #999999;
}

.toc-sidebar a.active {
    color: white;
    border-left-color: #0054c9;
}

.toc-sidebar a:hover {
    color: #8fe48f;
}