/* Bootstrap-first stylingr */

/* Only custom styling that extends Bootstrap */

/* Dashboard sidebar mobile responsive */
@media (max-width: 767.98px) {
    #sidebarNav {
        transform: translateX(-100%);
        z-index: 1050;
        transition: transform 0.3s ease-in-out;
    }
    
    #sidebarNav.show {
        transform: translateX(0);
    }
    
    #sidebarOverlay {
        z-index: 1040;
    }
    
    #sidebarOverlay.show {
        display: block !important;
    }
    
    /* Ensure main content doesn't get hidden behind sidebar */
    main {
        margin-left: 0 !important;
    }
}

@media (min-width: 768px) {
    #sidebarNav {
        transform: translateX(0) !important;
        position: static !important;
    }
    
    #sidebarOverlay {
        display: none !important;
    }
}

/* Log container - Console-like dark theme */
.log-container {
    background-color: #1e1e1e;
    border-radius: 0.375rem;
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Log entries */
.log-entry {
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

.log-entry:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Log levels - Using semantic colors */
.log-entry.error {
    color: #f8d7da;
    border-left: 3px solid #dc3545;
}

.log-entry.warning {
    color: #fff3cd;
    border-left: 3px solid #ffc107;
}

.log-entry.info {
    color: #d1ecf1;
    border-left: 3px solid #0dcaf0;
}

.log-entry.debug {
    color: #d3d3d4;
    border-left: 3px solid #6c757d;
}

/* Timestamp styling */
.log-timestamp {
    color: #6c757d;
    font-weight: 600;
}

/* Log message */
.log-message {
    margin-left: 0.5rem;
}

/* Stats badges - Enhance Bootstrap badges */
.stat-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Pointer cursor for navigation links without href */
.nav-link[data-target] {
    cursor: pointer;
}

/* Sortable table headers */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Sort indicators */
.sort-asc::after {
    content: " ▲";
    color: #0d6efd;
}

.sort-desc::after {
    content: " ▼";
    color: #0d6efd;
}

/* Openbare Snapshots: scroll box, max 10 rijen */
.openbare-snapshots-scroll {
    max-height: 25rem;
    overflow-y: auto;
}

/* Stelling-pagina: schaakbord container (max 1000px voor grootste afmeting) */
.stelling-board-wrap {
    max-width: 100%;
}

.stelling-board-img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 0.375rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
}

/* Schaakbord-pagina: voorkom verschuiving tijdens slepen */
#schaakbordBoardWrap {
    line-height: 0;
    overflow: hidden;
    position: relative;
}
#schaakbordBoard {
    display: block;
}
/* Voorkom dat horizontale scrollbar tijdens drag het bord laat verschuiven */
#schaakbordBrowserWrap {
    overflow-x: hidden;
}

/* Schaakbord-pagina: veldkleuren per thema (Standaard = library-default, geen override) */
#schaakbordBoard.theme-dark .white-1e1d7 { background-color: #7d8b99; color: #4a5568; }
#schaakbordBoard.theme-dark .black-3c85d { background-color: #4a5568; color: #7d8b99; }
#schaakbordBoard.theme-light .white-1e1d7 { background-color: #ffce9e; color: #d18b47; }
#schaakbordBoard.theme-light .black-3c85d { background-color: #d18b47; color: #ffce9e; }
#schaakbordBoard.theme-green .white-1e1d7 { background-color: #baca44; color: #6b8f3e; }
#schaakbordBoard.theme-green .black-3c85d { background-color: #6b8f3e; color: #baca44; }
#schaakbordBoard.theme-blue .white-1e1d7 { background-color: #9db4c8; color: #5c7a99; }
#schaakbordBoard.theme-blue .black-3c85d { background-color: #5c7a99; color: #9db4c8; }
#schaakbordBoard.theme-grey .white-1e1d7 { background-color: #c4c4c4; color: #808080; }
#schaakbordBoard.theme-grey .black-3c85d { background-color: #808080; color: #c4c4c4; }

/* Schaakbord-pagina: coördinaten in het midden van de rand (letters onder kolom, cijfers naast rij) */
#schaakbordBoard .notation-322f9.alpha-d2270 {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 2px;
}
#schaakbordBoard .notation-322f9.numeric-fc462 {
    top: 50%;
    transform: translateY(-50%);
    left: 3px;
}

/* Stelling-pagina: speelbaar bord (zelfde thema's en notatie-actief) */
#stellingBoardWrap {
    line-height: 0;
    overflow: hidden;
    position: relative;
}
#stellingBoard {
    display: block;
}
#stellingBrowserWrap {
    overflow-x: visible;
}
#stellingBoard.theme-dark .white-1e1d7 { background-color: #7d8b99; color: #4a5568; }
#stellingBoard.theme-dark .black-3c85d { background-color: #4a5568; color: #7d8b99; }
#stellingBoard.theme-light .white-1e1d7 { background-color: #ffce9e; color: #d18b47; }
#stellingBoard.theme-light .black-3c85d { background-color: #d18b47; color: #ffce9e; }
#stellingBoard.theme-green .white-1e1d7 { background-color: #baca44; color: #6b8f3e; }
#stellingBoard.theme-green .black-3c85d { background-color: #6b8f3e; color: #baca44; }
#stellingBoard.theme-blue .white-1e1d7 { background-color: #9db4c8; color: #5c7a99; }
#stellingBoard.theme-blue .black-3c85d { background-color: #5c7a99; color: #9db4c8; }
#stellingBoard.theme-grey .white-1e1d7 { background-color: #c4c4c4; color: #808080; }
#stellingBoard.theme-grey .black-3c85d { background-color: #808080; color: #c4c4c4; }
.stelling-move-active { font-weight: bold; background-color: #cce5ff !important; }
#stellingBoard .notation-322f9.alpha-d2270 {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 2px;
}
#stellingBoard .notation-322f9.numeric-fc462 {
    top: 50%;
    transform: translateY(-50%);
    left: 3px;
}
