/* --- SCOPED RESET --- */
.lbtut-system-wrapper {
    box-sizing: border-box;
    width: 100%;
    
    /* 1. FORCE HEIGHT to 75% of viewport height */
    height: 90vh; 
    
    display: flex;
    background-color: #050505;
    color: #e0e0e0;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.lbtut-system-wrapper * {
    box-sizing: border-box;
}

/* --- SIDEBAR (TOC) --- */
.lbtut-system-sidebar {
    width: 280px;
    background-color: #0b0b0b;
    border-right: 1px solid #1f1f1f;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.lbtut-system-header {
    padding: 20px;
    background-color: #0b0b0b;
    border-bottom: 1px solid #1f1f1f;
    flex-shrink: 0; 
}

.lbtut-system-title {
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    font-weight: 700;
}

.lbtut-system-progress-track {
    width: 100%;
    height: 4px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}

.lbtut-system-progress-bar {
    height: 100%;
    width: 0%;
    background: #007bff;
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.8);
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.lbtut-system-toc {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-y: auto;
    flex-grow: 1;
}

.lbtut-system-toc-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
    border-bottom: 1px solid #111;
}

.lbtut-system-toc-item:hover {
    background-color: #111;
}

.lbtut-system-toc-item.lbtut-is-active {
    background-color: #0f1520;
    border-left-color: #007bff;
}

.lbtut-system-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1a1a1a;
    color: #666;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.lbtut-system-toc-item.lbtut-is-active .lbtut-system-number {
    background: #007bff;
    color: #fff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
}

.lbtut-system-label {
    font-size: 13px;
    line-height: 1.4;
    color: #aaa;
    font-weight: 500;
}

.lbtut-system-toc-item.lbtut-is-active .lbtut-system-label {
    color: #fff;
}

/* --- VIEWPORT (RIGHT SIDE) --- */
.lbtut-system-viewport {
    flex-grow: 1;
    height: 100%; 
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #050505;
    overflow: hidden; 
}

/* SLIDE SCROLLS INDEPENDENTLY */
.lbtut-system-slide {
    display: none; 
    flex-direction: column;
    padding: 0; 
    flex-grow: 1;
    overflow-y: auto;
    animation: lbtutFadeIn 0.4s ease-out;
}

.lbtut-system-slide.lbtut-is-active {
    display: flex;
}

@keyframes lbtutFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* IMAGE FULL WIDTH */
.lbtut-system-media {
	display: flex;
	flex-direction: column;
    width: 100%;
    margin-bottom: 0px;
    background: #050505;
    flex-shrink: 0;
}

.lbtut-system-img {
    display: block;
    width: 100%; 
    height: auto;
    object-fit: cover; 
}

/* Content Body */
.lbtut-system-body {
    padding: 0 40px 40px 40px; 
}

.lbtut-system-heading {
    margin: 20px 0 15px 0;
    font-size: 28px;
    color: #fff;
    font-weight: 700;
}

.lbtut-system-desc {
    color: #bbb;
    line-height: 1.7;
    font-size: 14px;
}

/* HTML CONTENT STYLING */
.lbtut-system-desc h3 { color: #fff; margin-top: 20px; font-size: 1.2rem; }
.lbtut-system-desc strong { color: #fff; }
.lbtut-system-desc code { background: #222; padding: 2px 6px; border-radius: 4px; color: #72b6ff; font-family: monospace; }
.lbtut-system-desc ul { list-style: disc; margin-left: 20px; }
.lbtut-system-desc a { color: #007bff; text-decoration: none; }
.lbtut-system-desc a:hover { text-decoration: underline; }

/* --- FIX FOR WPAUTOP & IMAGE GAPS --- */

/* 1. Tame the Paragraph Margins */
/* This removes the default browser top-margin that pushes content down */
.lbtut-system-desc p {
    margin: 0 0 15px 0; 
    padding: 0;
}

/* 2. Remove the bottom gap from the very last paragraph */
/* This ensures the content sits flush against the bottom of the container */
.lbtut-system-desc p:last-child {
    margin-bottom: 0;
}

/* 3. Fix the "Inline Image" Gap */
/* By default, images sit on a text baseline (leaving space for letters like 'g' or 'y').
   Switching to display: block removes that tiny sliver of space at the bottom. */
.lbtut-system-desc img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 0 15px 0; /* Optional: adds space below the image */
}

/* VIDEO / IFRAME SUPPORT (New) */
.lbtut-system-desc iframe, 
.lbtut-system-desc video { 
    width: 100%; 
    height: auto; 
    aspect-ratio: 16/9; /* Forces widescreen ratio */
    border-radius: 6px;
    border: 1px solid #222;
    display: block;
    margin: 20px 0;
}

/* --- FOOTER / CONTROLS --- */
.lbtut-system-controls {
    flex-shrink: 0; 
    padding: 20px 40px;
    border-top: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #080808;
    z-index: 10;
    min-height: 80px;
}

.lbtut-system-btn {
    padding: 12px 24px;
    border: 1px solid #333;
    background: transparent !important; /* Forces transparent unless overridden */
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.lbtut-system-btn:hover { border-color: #666; }
.lbtut-system-btn:disabled { opacity: 0.3; cursor: not-allowed; border-color: #222; }

/* FORCE PREVIOUS BUTTON TO BE TRANSPARENT */
.lbtut-btn-prev {
    background-color: transparent !important;
}
.lbtut-btn-prev:hover {
    background-color: #1a1a1a !important;
}

/* FORCE NEXT BUTTON COLORS (New) */
.lbtut-btn-next {
    background-color: #007bff !important; /* LaunchBoost Blue */
    border-color: #007bff !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.lbtut-btn-next:hover {
    background-color: #0062cc !important; /* Darker Hover Blue */
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);
    transform: translateY(-1px);
}

/* RESPONSIVE */
@media (max-width: 800px) {
    .lbtut-system-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 90vh;
    }
    .lbtut-system-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #222;
        flex-grow: 0;
    }
    .lbtut-system-toc { display: none; }
    .lbtut-system-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    .lbtut-system-title { margin: 0; }
    .lbtut-system-progress-track { width: 50%; margin-left: auto; }
}