/* PageBuilder Custom Styles - AWS Lambda Testing Overlay and User Menu */

.header {
    background-color: #0c3f97 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; */
}

/* Explicit styles for sectioned h1 elements to eliminate browser warning */
section h1,
article h1,
aside h1,
nav h1 {
    font-size: inherit;
    margin: inherit;
}

/* Test Results Overlay */
.test-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: flex-end;
    align-items: center;
    padding-right: 0;
}

.test-results-content {
    background-color: #ffffff;
    height: 100vh;
    min-width: min(1000px, 100vw);
    max-width: max(1600px, 60vw);
    width: auto;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    position: relative;
    border-radius: 8px 0 0 8px;
}

.test-results-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
}

.test-results-header h4 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.test-results-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.test-results-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

.test-results-body {
    padding: 20px;
    min-height: calc(100vh - 80px);
}

/* Test Button Styling */
.test-lab-button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.test-lab-button:hover {
    background: linear-gradient(135deg, #0056b3, #004494);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.test-lab-button:active {
    transform: translateY(0);
}

.test-lab-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.test-lab-button i {
    font-size: 16px;
}

/* Loading state */
.test-lab-button.loading {
    background: #6c757d;
    cursor: wait;
}

.test-lab-button.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success and error states */
.test-results-success {
    border-left: 4px solid #28a745;
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

.test-results-error {
    border-left: 4px solid #dc3545;
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .test-results-content {
        min-width: 100vw;
        max-width: 100vw;
        border-radius: 0;
    }
    
    .test-lab-button {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .test-results-content {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .test-results-header {
        background-color: #4a5568;
        border-bottom-color: #2d3748;
    }
    
    .test-results-header h4 {
        color: #e2e8f0;
    }
    
    .test-results-close {
        color: #a0aec0;
    }
    
    .test-results-close:hover {
        background-color: #2d3748;
        color: #e2e8f0;
    }
}

/* Code Block Styling with Copy Button */
.docs-code-block {
    position: relative;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
    overflow: hidden;
}

.code-block-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 12px;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    min-height: 40px;
}

.copy-code-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    justify-content: center;
}

.copy-code-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.copy-code-btn:active {
    transform: translateY(0);
}

.copy-code-btn.success {
    background-color: #28a745;
}

.copy-code-btn.error {
    background-color: #dc3545;
}

.copy-code-btn i {
    font-size: 11px;
}

.copy-text {
    font-size: 12px;
}

/* Inline copy button */
.copy-inline-btn {
    display: inline-block;
    margin-left: 4px;
    padding: 0;
    background: none;
    color: #2c5aa0;  /* Dark blue color */
    border: none;
    cursor: pointer;
    font-size: 12px;
    vertical-align: baseline;
    transition: color 0.2s ease, transform 0.2s ease;
}

.copy-inline-btn:hover {
    color: #1e3a6f;  /* Darker blue on hover */
    transform: scale(1.1);
}

.copy-inline-btn:active {
    transform: scale(0.95);
}

.copy-inline-btn.success {
    color: #28a745;  /* Green on success */
}

.copy-inline-btn.error {
    color: #dc3545;  /* Red on error */
}

.copy-inline-btn i {
    font-size: 12px;
}

/* Enhanced code block content */
.docs-code-block pre {
    margin: 0;
    padding: 15px;
    background-color: #f8f9fa;
    border: none;
    border-radius: 0;
    overflow-x: auto;
    overflow-y: hidden;
    /* Fixed scrollbars to prevent text overlap */
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

/* Webkit scrollbar styling for better appearance */
.docs-code-block pre::-webkit-scrollbar {
    height: 8px;
}

.docs-code-block pre::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.docs-code-block pre::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.docs-code-block pre::-webkit-scrollbar-thumb:hover {
    background: #5a6268;
}

/* Inner margin of 5px to prevent text being hard aligned to edge */
.docs-code-block pre code {
    display: block;
    padding: 5px;
    background: transparent;
    border: none;
    color: inherit;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
}

/* Language-specific styling */
.docs-code-block pre.bash,
.docs-code-block pre.shell {
    background-color: #2d3748;
    color: #e2e8f0;
}

.docs-code-block pre.bash code,
.docs-code-block pre.shell code {
    color: #e2e8f0;
}

.docs-code-block pre.json {
    background-color: #1a202c;
    color: #cbd5e0;
}

.docs-code-block pre.json code {
    color: #cbd5e0;
}

.docs-code-block pre.yaml,
.docs-code-block pre.yml {
    background-color: #2d3748;
    color: #e2e8f0;
}

.docs-code-block pre.yaml code,
.docs-code-block pre.yml code {
    color: #e2e8f0;
}

/* Responsive adjustments for code blocks */
@media (max-width: 768px) {
    .docs-code-block {
        margin: 15px 0;
    }
    
    .code-block-header {
        padding: 6px 10px;
    }
    
    .copy-code-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 70px;
    }
    
    .docs-code-block pre {
        padding: 12px;
        font-size: 13px;
    }
    
    .docs-code-block pre code {
        padding: 3px;
    }
}

/* Test Block Styling - Similar to Code Block but with Blue Theme */
.docs-test-block {
    position: relative;
    margin: 20px 0;
    border: 1px solid #007bff;
    border-radius: 8px;
    background-color: #f8f9ff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.test-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom: 1px solid #0056b3;
    min-height: 50px;
}

.test-header-content {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 15px;
}

.test-title {
    margin-left: 0;
}

.test-block-body {
    padding: 16px;
    background-color: #f8f9ff;
    border: none;
    border-radius: 0;
}

.test-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
    color: #495057;
    line-height: 1.6;
}

.test-list li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.test-list li::marker {
    color: #007bff;
}

/* Enhanced test button styling within the test block */
.docs-test-block .test-lab-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.docs-test-block .test-lab-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.docs-test-block .test-lab-button:active {
    transform: translateY(0);
}

.docs-test-block .test-lab-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.docs-test-block .test-lab-button i {
    font-size: 14px;
}

/* Loading state for test button in block */
.docs-test-block .test-lab-button.loading {
    background: rgba(255, 255, 255, 0.1);
    cursor: wait;
}

.docs-test-block .test-lab-button.loading i {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments for test blocks */
@media (max-width: 768px) {
    .docs-test-block {
        margin: 15px 0;
    }
    
    .test-block-header {
        padding: 10px 12px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .test-header-content {
        justify-content: center;
    }
    
    .docs-test-block .test-lab-button {
        padding: 8px 12px;
        font-size: 12px;
        width: auto;
        min-width: 120px;
        justify-content: center;
    }
    
    .test-block-body {
        padding: 12px;
    }
    
    .test-list {
        padding-left: 16px;
    }
}

/* User Menu Utilities Container */
.docs-top-utilities {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;
}

/* User Menu Styling */
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f0f6fc;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.user-menu-trigger:hover {
    background: #e3ecf6;
    border-color: #b8c5d6;
    transform: scale(1.02);
    color: #212529;
}

.user-menu-trigger .user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #495057;
}

.user-menu-trigger i {
    color: #6c757d;
}

.user-menu-trigger:hover i {
    color: #495057;
}

.user-menu-trigger .menu-icon {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* User Menu Overlay */
.user-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-menu-overlay.active {
    display: block;
    opacity: 1;
}

.user-menu-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.user-menu-overlay.active .user-menu-panel {
    right: 0;
}

/* Menu Header */
.user-menu-header {
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.user-menu-header-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.user-menu-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-menu-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.user-menu-info .user-email {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 2px;
}

.user-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.user-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Menu Body */
.user-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.user-menu-section {
    padding: 0 20px;
    margin-bottom: 24px;
}

.user-menu-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.user-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-menu-item {
    margin-bottom: 4px;
}

.user-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.user-menu-item a:hover {
    background: #f3f4f6;
    color: #111827;
    transform: translateX(4px);
}

.user-menu-item i {
    width: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 16px;
}

.user-menu-item a:hover i {
    color: #667eea;
}

/* Menu Badge */
.menu-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: #667eea;
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Menu Footer */
.user-menu-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.user-menu-logout {
    width: 100%;
    padding: 10px 16px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.user-menu-logout:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .user-menu-panel {
        background: #1f2937;
        color: #f3f4f6;
    }
    
    .user-menu-header {
        border-bottom-color: #374151;
    }
    
    .user-menu-section-title {
        color: #9ca3af;
    }
    
    .user-menu-item a {
        color: #e5e7eb;
    }
    
    .user-menu-item a:hover {
        background: #374151;
        color: #f9fafb;
    }
    
    .user-menu-item i {
        color: #9ca3af;
    }
    
    .user-menu-footer {
        background: #111827;
        border-top-color: #374151;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .user-menu-trigger {
        right: 10px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .user-menu-trigger .user-name {
        max-width: 100px;
    }
    
    .user-menu-panel {
        width: 100%;
        right: -100%;
    }
    
    .user-menu-header {
        padding: 20px;
    }
    
    .user-menu-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .user-menu-info h3 {
        font-size: 16px;
    }
}

/* Compact One-Line Page Header */
.oneline-page-header {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    min-height: auto;
}

.oneline-page-header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
}

.oneline-page-header .page-heading {
    margin-bottom: 0;
    font-size: 1.75rem;
    line-height: 1.2;
}

/* Hide empty elements in oneline header */
.oneline-page-header .page-intro:empty,
.oneline-page-header .main-search-box:empty {
    display: none;
}

/* Adjust background shapes for compact header */
.oneline-page-header .theme-bg-shapes-right,
.oneline-page-header .theme-bg-shapes-left {
    height: 100%;
    top: 0;
    transform: scale(0.7);
}

/* Mobile responsive for oneline header */
@media (max-width: 768px) {
    .oneline-page-header {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .oneline-page-header .page-heading {
        font-size: 1.5rem;
    }
    
    .oneline-page-header .theme-bg-shapes-right,
    .oneline-page-header .theme-bg-shapes-left {
        transform: scale(0.5);
    }
}
/* User Sidebar Menu Styles */
.user-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1050;
    transition: transform 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.user-sidebar.sidebar-hidden {
    transform: translateX(100%);
}

.user-sidebar.sidebar-visible {
    transform: translateX(0);
}

.user-sidebar-inner {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    color: white;
}

.user-sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 10px;
}

.user-sidebar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.user-sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}

.user-menu-btn {
    background: transparent \!important;
    color: #4550E6 \!important;
    text-decoration: none \!important;
    border: 1px solid rgba(69, 80, 230, 0.3) \!important;
    padding: 8px 15px \!important;
    border-radius: 5px \!important;
    transition: all 0.3s \!important;
    cursor: pointer \!important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) \!important;
}

.user-menu-btn:hover {
    background: rgba(69, 80, 230, 0.05) \!important;
    border-color: rgba(69, 80, 230, 0.5) \!important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) \!important;
    transform: translateY(-1px) \!important;
}

.user-menu-btn:focus {
    outline: none \!important;
    box-shadow: 0 0 0 0.2rem rgba(69, 80, 230, 0.25) \!important;
}

/* Sidebar overlay - click to close sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Markup Editor Styles
   ======================================== */

/* Enhanced Markup Editor Styles with Versioning */
.markup-editor-header {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px 5px 0 0;
    margin-bottom: 0;
    border: 1px solid #dee2e6;
    border-bottom: none;
}

/* Information View Card Styles */
.information-view .card {
    background: #f5f6fe;
    border-color: #e7e9ed;
}

.information-view .card:hover {
    background: #f5f6fe !important;
    box-shadow: none !important;
}

/* Information/Content Tab Styles */
.markup-editor-header .nav-tabs {
    border-bottom: none;
    margin-bottom: 0;
    position: relative;
}

/* Blue line extending across the parent container */
.markup-editor-header > div:first-child {
    position: relative;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0;
}

.markup-editor-header .nav-tabs .nav-item {
    margin-bottom: -3px;
    position: relative;
    z-index: 2;
}

.markup-editor-header .nav-tabs .nav-link {
    border: 3px solid transparent;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #6c757d;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    position: relative;
    border-radius: 8px 8px 0 0;
    margin-right: 0.25rem;
    transition: all 0.2s ease;
}

.markup-editor-header .nav-tabs .nav-link:hover {
    border-color: #c8d9f5;
    border-bottom-color: transparent;
    background: #f0f4ff;
    color: #667eea;
}

.markup-editor-header .nav-tabs .nav-link.active {
    border-color: #667eea;
    border-bottom-color: #f8f9fa;
    background: #f8f9fa;
    color: #667eea;
    font-weight: 600;
    position: relative;
    z-index: 3;
}

.markup-editor-header .nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #f8f9fa;
    z-index: 4;
}

/* Visual distinction for formatting toolbar */
.markup-formatting-toolbar {
    background: #e8f0fe !important; /* Light blue to match site theme */
    border-color: #c8d9f5 !important;
}

.markup-formatting-toolbar .btn-outline-secondary {
    border-color: #6c9bd2;
    color: #4a7ba7;
}

.markup-formatting-toolbar .btn-outline-secondary:hover {
    background-color: #d4e4f7;
    border-color: #5889b8;
    color: #2c5282;
}

/* Responsive adjustments for editor header */
@media (max-width: 576px) {
    .markup-editor-header {
        padding: 10px;
    }

    .markup-editor-header .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }

    .markup-editor-header .form-select {
        font-size: 0.875rem;
    }
}

/* Hide button text on very small screens */
@media (max-width: 400px) {
    .btn-text {
        display: none !important;
    }
}

/* Ensure minimum container width per Bootstrap standards */
@media (min-width: 320px) {
    .container {
        min-width: 320px;
    }
}

.markup-editor-container {
    position: relative;
    /* Override any inherited styles */
    display: block !important;
    flex-direction: unset !important;
    height: auto !important;
    min-height: unset !important;
}

/* Editor wrapper and text area */
.markup-editor-wrapper {
    position: relative;
    border: 1px solid #dee2e6;
    border-top: none;
    border-bottom: none;
    overflow: hidden;
    /* Proper height calculation without inheritance issues */
    height: calc(100vh - 480px);
}

.markup-text-editor {
    width: 100%;
    height: 100%; /* Fill the wrapper completely */
    padding: 15px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    border: none;
    resize: vertical; /* Allow manual resize */
    overflow-y: auto;
}

/* Status Bar */
.markup-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 5px 5px;
    font-size: 13px;
    color: #6c757d;
}

/* Preview Panel Styles */
.preview-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100vh;
    background: white;
    z-index: 1040;
    display: none;
    flex-direction: column;
    border-left: 3px solid #003366;
}

.preview-panel.active {
    display: flex;
}

.preview-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    height: 69px;
    flex-shrink: 0;
}

.preview-header .docs-logo-wrapper {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.preview-header .site-logo {
    display: flex;
    align-items: center;
}

.preview-header .navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.preview-header .logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.preview-header .logo-text {
    color: white !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    white-space: nowrap;
}

.preview-header button {
    flex-shrink: 0;
}

.preview-header h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: white !important;
    margin: 0;
}

.preview-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Split view - fixed 50/50 */
.split-view-active {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.split-view-active .page-content {
    width: 50% !important;
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
}

.split-view-active .preview-panel {
    width: 50% !important;
    right: 0 !important;
    left: auto !important;
}

/* AWS Service Search Styles */
.aws-service-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

.aws-service-dropdown.show {
    display: block;
}

.aws-service-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f0f0f0;
}

.aws-service-item:last-child {
    border-bottom: none;
}

.aws-service-item:hover {
    background-color: #f8f9fa;
}

.aws-service-item.highlighted {
    background-color: #e8f0fe;
}

.aws-service-name {
    font-weight: 500;
    color: #333;
}

.aws-service-description {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Selected Services Container */
.selected-services-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.selected-service-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 3px solid #667eea;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #667eea;
    transition: all 0.2s ease;
}

.selected-service-tag:hover {
    background-color: #f0f4ff;
    border-color: #5566d8;
}

.selected-service-tag .remove-service {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.selected-service-tag .remove-service:hover {
    color: #d9534f;
}

.preview-divider {
    position: fixed;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100vh;
    background: #dee2e6;
    z-index: 1050;
    display: none;
    margin-left: -1px;
}

.preview-divider.active {
    display: block;
}

/* Loading overlay */
.preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.preview-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive preview */
@media (max-width: 768px) {
    .preview-panel {
        width: 100%;
        right: -100%;
    }

    .split-view-active .container {
        max-width: 100%;
    }
}

.status-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .status-info {
        gap: 10px;
    }

    .status-item span {
        font-size: 0.75rem;
    }
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.auto-save-indicator {
    color: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Version Save Modal */
.version-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1045;
    align-items: center;
    justify-content: center;
}

.version-modal.active {
    display: flex;
}

.version-form {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
}

.version-tag-input {
    margin: 15px 0;
}

/* Version limit warning */
.version-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.version-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.version-item:hover {
    background: #f8f9fa;
}

.version-item:last-child {
    border-bottom: none;
}

.version-item-info {
    flex: 1;
}

.version-item-date {
    font-weight: 500;
    color: #333;
}

.version-item-tag {
    font-size: 12px;
    color: #6c757d;
}

.version-item-delete {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.version-item-delete:hover {
    color: #a71d2a;
}

/* Image Gallery */
.image-gallery {
    display: none;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-top: 15px;
}

.image-gallery.active {
    display: block;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-item {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-item:hover {
    transform: scale(1.05);
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.image-item-name {
    padding: 5px;
    font-size: 12px;
    background: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-zone.dragover {
    border-color: #28a745;
    background: #e8f5e9;
}

/* Help Overlay */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.help-overlay.active {
    display: flex;
}

.help-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.help-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Publishing Modal */
.publish-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1045;
    align-items: center;
    justify-content: center;
}

.publish-modal.active {
    display: flex;
}

.publish-form {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
}

/* Status Messages */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    display: none;
    z-index: 1060;
    animation: slideIn 0.3s ease;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin-animation 1s ease-in-out infinite;
}

@keyframes spin-animation {
    to { transform: rotate(360deg); }
}

/* Expandable Code Block Styles */
.docs-code-block-expandable,
.docs-code-block-overlay {
  position: relative;
}
.code-block-footer {
  display: flex;
  justify-content: center;
  padding: 8px 12px;
  background-color: #e9ecef;
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 8px 8px;
}
.expand-code-btn,
.overlay-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: #6c757d;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.expand-code-btn:hover,
.overlay-code-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
}
.expand-code-btn i,
.overlay-code-btn i {
  transition: transform 0.3s ease;
}
.expand-code-btn.expanded i {
  transform: rotate(180deg);
}
.code-truncated-indicator {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  margin-top: 8px;
}

/* Code Overlay Modal Styles */
.code-overlay-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  padding: 40px 20px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
}
.code-overlay-modal.active {
  display: flex;
  flex-direction: column;
}
.code-overlay-content {
  display: flex;
  flex-direction: column;
  max-width: 1320px;
  width: 100%;
  max-height: calc(100vh - 80px);
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive overlay widths to match Bootstrap container breakpoints */
@media (max-width: 1399px) {
  .code-overlay-content {
    max-width: 1140px;
  }
}
@media (max-width: 1199px) {
  .code-overlay-content {
    max-width: 960px;
  }
}
@media (max-width: 991px) {
  .code-overlay-content {
    max-width: 720px;
  }
}
@media (max-width: 767px) {
  .code-overlay-content {
    max-width: 540px;
  }
}
@media (max-width: 575px) {
  .code-overlay-content {
    max-width: 100%;
  }
}
.code-overlay-header {
  display: flex;
  justify-content: flex-end;
  padding: 10px 15px;
  background-color: #e9ecef;
  border-bottom: 1px solid #dee2e6;
}
.code-overlay-body {
  flex: 1;
  overflow: auto;
  background-color: #f8f9fa;
}
.code-overlay-body pre {
  margin: 0;
  padding: 15px;
  min-height: 100%;
  background-color: #f8f9fa;
  color: #212529;
}
.code-overlay-footer {
  display: flex;
  justify-content: center;
  padding: 12px 15px;
  background-color: #e9ecef;
  border-top: 1px solid #dee2e6;
}
.close-overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background-color: #6c757d;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.close-overlay-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
}
/* =============================================================================
   Checkpoint Component CSS Classes
   Generated for markup-converter.py [checkpoint] tag
   ============================================================================= */

/* Main checkpoint container - green rounded box */
.docs-checkpoint-block {
    border-radius: 0.5rem;
    border: 1px solid #28a745;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Header bar - darker green background */
.checkpoint-block-header {
    background-color: #28a745;
    padding: 0.75rem 1rem;
}

.checkpoint-header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.checkpoint-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Body content area */
.checkpoint-block-body {
    padding: 1rem;
    background-color: #ffffff;
}

/* Confirm button bar - lighter green strip */
.checkpoint-confirm-bar {
    background-color: #d4edda;
    border-top: 1px solid #c3e6cb;
    border-bottom: 1px solid #c3e6cb;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem -1rem;  /* Extend to edges of body padding */
}

/* Confirm button - centered in the bar */
.checkpoint-confirm-btn {
    background-color: #28a745;
    border: none;
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.checkpoint-confirm-btn:hover {
    background-color: #218838;
}

.checkpoint-confirm-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}

.checkpoint-confirm-btn:active {
    background-color: #1e7e34;
}

/* =============================================================================
   Checkpoint Progress Tracking Styles
   For user progress tracking feature
   ============================================================================= */

/* Header layout with actions on right */
.checkpoint-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkpoint-header-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkpoint-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Status indicator next to title */
.checkpoint-status {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.checkpoint-status-complete {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.checkpoint-status-saving {
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.checkpoint-status-error {
    background-color: rgba(220, 53, 69, 0.8);
    color: #ffffff;
}

/* Toggle switch styling */
.checkpoint-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin: 0;
}

.checkpoint-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkpoint-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 26px;
    transition: 0.3s;
}

.checkpoint-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.checkpoint-checkbox:checked + .checkpoint-toggle-slider {
    background-color: rgba(255, 255, 255, 0.5);
}

.checkpoint-checkbox:checked + .checkpoint-toggle-slider:before {
    transform: translateX(22px);
    background-color: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.checkpoint-checkbox:focus + .checkpoint-toggle-slider {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

/* Login prompt link */
.checkpoint-login-prompt {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    transition: background-color 0.15s ease;
}

.checkpoint-login-prompt:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.checkpoint-login-prompt i {
    margin-right: 0.35rem;
}

/* Completed checkpoint styling */
.docs-checkpoint-block.checkpoint-completed {
    border-color: #1e7e34;
}

.docs-checkpoint-block.checkpoint-completed .checkpoint-block-header {
    background-color: #1e7e34;
}

/* Progress bar container - for chapter/course pages */
.checkpoint-progress-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.checkpoint-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkpoint-progress-title {
    font-weight: 600;
    color: #495057;
}

.checkpoint-progress-text {
    font-size: 0.85rem;
    color: #6c757d;
}

.checkpoint-progress-track {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.checkpoint-progress-bar {
    height: 100%;
    background-color: #28a745;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* =============================================================================
   Question Component CSS Classes
   Generated for markup-converter.py [question] tag
   Styled to match the existing [tests] block (blue theme)
   ============================================================================= */

/* Main question container - blue rounded box (matching tests block) */
.docs-question-block {
    border-radius: 0.5rem;
    border: 1px solid #0d6efd;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Header bar - blue background (matching tests block header) */
.question-block-header {
    background-color: #0d6efd;
    padding: 0.75rem 1rem;
    color: white;
}

.question-header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.question-header-content i {
    color: #ffffff;
}

.question-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Body content area */
.question-block-body {
    padding: 1rem;
    background-color: #ffffff;
}

/* Question text */
.question-text {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Answer options container */
.question-answers {
    margin-bottom: 1rem;
}

/* Individual answer option */
.question-answer-option {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.question-answer-option:last-child {
    border-bottom: none;
}

.question-answer-option input[type="radio"],
.question-answer-option input[type="checkbox"] {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.question-answer-option label {
    cursor: pointer;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Submit button bar - lighter blue strip */
.question-submit-bar {
    background-color: #cfe2ff;
    border-top: 1px solid #b6d4fe;
    border-bottom: 1px solid #b6d4fe;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem -1rem;
}

/* Submit button */
.question-submit-btn {
    background-color: #0d6efd;
    border: none;
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.question-submit-btn:hover {
    background-color: #0b5ed7;
}

.question-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.5);
}

.question-submit-btn:active {
    background-color: #0a58ca;
}

/* Feedback area */
.question-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.25rem;
}

/* Correct feedback - green */
.question-feedback-correct {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

.question-feedback-correct p {
    margin-bottom: 0;
}

/* Incorrect feedback - red */
.question-feedback-incorrect {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

.question-feedback-incorrect p {
    margin-bottom: 0;
}


/* =============================================================================
   PROGRESS CHECKPOINT BAR - Course-wide progress display
   All classes use -checkpoint-bar suffix to avoid CSS conflicts
   ============================================================================= */

/* Main container - sticky at top of docs-content, below site header */
.progress-checkpoint-bar {
    position: sticky;
    top: 69px;
    background-color: #e7f1ff;
    border-bottom: 1px solid #b6d4fe;
    margin-bottom: 1rem;
    z-index: 1020;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header row - clickable to expand/collapse */
.progress-checkpoint-bar-header {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    cursor: pointer;
    gap: 1rem;
    min-height: 45px;
    margin: 0 auto;
}

.progress-checkpoint-bar-header:hover {
    background-color: #d0e3ff;
}

/* Progress track (background) */
.progress-checkpoint-bar-track {
    flex: 1;
    height: 8px;
    background-color: #b6d4fe;
    border-radius: 4px;
    overflow: hidden;
    min-width: 100px;
}

/* Progress fill (foreground) */
.progress-checkpoint-bar-fill {
    height: 100%;
    background-color: #28a745;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Progress text */
.progress-checkpoint-bar-text {
    font-size: 0.85rem;
    color: #495057;
    white-space: nowrap;
}

/* Chevron icon */
.progress-checkpoint-bar-icon {
    color: #6c757d;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

/* Rotate icon when open */
.progress-checkpoint-bar-open .progress-checkpoint-bar-icon {
    transform: rotate(180deg);
}

/* Checkpoint list container */
.progress-checkpoint-bar-list {
    border-top: 1px solid #b6d4fe;
    max-height: 60vh;
    overflow-y: auto;
    background-color: #ffffff;
}

.progress-checkpoint-bar-collapsed {
    display: none;
}

.progress-checkpoint-bar-expanded {
    display: block;
}

/* Empty state */
.progress-checkpoint-bar-empty {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Individual checkpoint item */
.progress-checkpoint-bar-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: #495057;
    border-bottom: 1px solid #f1f3f4;
    gap: 0.75rem;
    transition: background-color 0.15s ease;
}

.progress-checkpoint-bar-item:last-child {
    border-bottom: none;
}

.progress-checkpoint-bar-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #495057;
}

/* Completed item */
.progress-checkpoint-bar-item-complete {
    background-color: #f0fff4;
}

.progress-checkpoint-bar-item-complete:hover {
    background-color: #e6ffed;
}

.progress-checkpoint-bar-item-complete .progress-checkpoint-bar-item-icon {
    color: #28a745;
}

/* Current page item */
.progress-checkpoint-bar-item-current {
    background-color: #fff3cd;
    font-weight: 500;
}

.progress-checkpoint-bar-item-current:hover {
    background-color: #ffe69c;
}

/* Icon container */
.progress-checkpoint-bar-item-icon {
    width: 1.25rem;
    text-align: center;
    color: #ced4da;
    font-size: 0.875rem;
}

/* Chapter label */
.progress-checkpoint-bar-item-chapter {
    font-size: 0.75rem;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    min-width: 3rem;
    text-align: center;
}

/* Checkpoint title */
.progress-checkpoint-bar-item-title {
    flex: 1;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-checkpoint-bar {
        top: 60px;  /* Smaller header on mobile */
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        border-left: none;
        border-right: none;
    }

    .progress-checkpoint-bar-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .progress-checkpoint-bar-track {
        order: 3;
        width: 100%;
        flex: none;
    }

    .progress-checkpoint-bar-text {
        flex: 1;
        font-size: 0.8rem;
    }

    .progress-checkpoint-bar-list {
        max-height: 50vh;
    }

    .progress-checkpoint-bar-item {
        padding: 0.5rem 0.75rem;
    }

    .progress-checkpoint-bar-item-chapter {
        font-size: 0.7rem;
        min-width: 2.5rem;
    }

    .progress-checkpoint-bar-item-title {
        font-size: 0.8125rem;
    }
}
