/* === HANDLEIDINGEN PLUGIN STYLES === */

/* Base Styles */
.handleidingen-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Category Cards */
.handleiding-category-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.handleiding-category-card:hover {
    transform: translateY(-5px);
}

/* === SINGLE HANDLEIDING LAYOUT === */
.handleiding-single-wrapper {
    width: 100%;
    position: relative;
}

.handleiding-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar */
.handleiding-sidebar-wrap {
    flex: 0 0 320px;
    min-width: 320px;
    position: relative;
}

.handleiding-sidebar-inner {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2196F3 #f1f1f1;
}

.handleiding-sidebar-inner::-webkit-scrollbar {
    width: 6px;
}

.handleiding-sidebar-inner::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.handleiding-sidebar-inner::-webkit-scrollbar-thumb {
    background: #2196F3;
    border-radius: 3px;
}

.sidebar-section {
    margin-bottom: 15px;
}

/* Main Content */
.handleiding-main-content {
    flex: 1;
    min-width: 0;
    max-width: 900px;
}

/* Table of Contents */
.handleiding-toc,
.handleiding-toc-mobile {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.handleiding-toc li,
.handleiding-toc-mobile li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.toc-link,
.toc-link-mobile {
    display: block;
    padding: 8px 12px;
    color: #2196F3;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.4;
}

.toc-link:hover,
.toc-link-mobile:hover {
    background-color: #e3f2fd;
    color: #1976D2;
    text-decoration: none;
}

.toc-link.active {
    background-color: #2196F3;
    color: white !important;
}

/* Progress Bar */
#reading-progress,
.mobile-reading-progress {
    transition: width 0.3s ease;
    background-color: #2196F3 !important;
}

/* === CODE BLOCKS === */
.handleiding-code-block {
    position: relative;
    margin: 25px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: #1e1e1e;
}

.handleiding-code-block .code-header {
    position: relative;
    background: linear-gradient(135deg, #333 0%, #444 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555;
}

.handleiding-code-block .code-header .w3-left {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.handleiding-code-block pre {
    margin: 0 !important;
    padding: 20px !important;
    background-color: #1e1e1e !important;
    border: none !important;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
}

.handleiding-code-block code {
    color: #f8f8f2 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    white-space: pre !important;
    display: block !important;
}

/* Copy Button */
.copy-code-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.copy-code-btn.copy-success {
    background: #4CAF50 !important;
    border-color: #4CAF50 !important;
}

.copy-code-btn span {
    color: #fff !important;
}

/* Mobile Progress Indicator */
.mobile-progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(33, 150, 243, 0.2);
    z-index: 9999;
}

.mobile-progress-bar {
    height: 100%;
    background: #2196F3;
    width: 0%;
    transition: width 0.3s ease;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .handleiding-layout {
        flex-direction: column;
        padding: 15px;
    }
    
    .handleiding-sidebar-wrap {
        display: none;
    }
    
    .handleiding-main-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .handleiding-article .w3-container {
        padding: 15px !important;
    }
    
    .handleiding-code-block pre {
        font-size: 12px !important;
        padding: 15px !important;
    }
}

/* Loading Animation */
.handleiding-loading {
    text-align: center;
    padding: 40px;
}

.handleiding-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .handleiding-sidebar-wrap,
    .copy-code-btn,
    .mobile-progress-indicator,
    .w3-hide-large {
        display: none !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Fix for conflicting themes */
.handleiding-single-wrapper * {
    box-sizing: border-box;
}

/* Ensure visibility */
.handleiding-sidebar-wrap,
.handleiding-sidebar-inner {
    visibility: visible !important;
    opacity: 1 !important;
}
