/* General styles */
/* Fix font inheritance to use parent theme/Elementor fonts */
.learnflash-outter,
.learnflash-course-grid-container,
.learnflash-sales-structure,
.lf-container,
.lf-container-fluid {
	font-family: inherit;
}

.learnflash-outter	{
	margin-top: 1em !important;
}

.learnflash-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.8rem;
    margin: 0 0 0 10px;
    text-align: center;
}

.learnflash-completed {
    background-color: #28a745; /* Green for completed */
    color: #fff;
}

.learnflash-in-progress {
    background-color: blue;
    color: #fff;
}

.learnflash-mark-complete {
    margin-left: 10px;
}

.ld-topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.ld-topic-row a {
    color: #333;
    text-decoration: none;
}

.ld-topic-row a:hover {
    color: #007bff;
}

.ld-status-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
}

.ld-status-complete {
    background-color: #28a745;
    color: #fff;
}

.ld-status-incomplete {
    background-color: #ccc;
    color: #fff;
}
	
/* Sidebar styles */
.sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100vh;
    background-color: #f8f9fa;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    transition: left 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    flex-shrink: 0;
    padding: 10px;
    background-color: #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo {
    flex-shrink: 0;
    padding: 10px;
    max-height: 100px;
    overflow: hidden;
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Custom scrollbar for WebKit browsers */
.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Sidebar list styles */
.sidebar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
}

.sidebar a {
    color: #808080;
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: black;
}

.sidebar h4 {
    font-size: 1.2em;
    margin: 0;
    padding: 10px 0;
    line-height: 1.3;
}

.sidebar-module-title {
    flex-shrink: 0;
}

.sidebar-topics-list {
    flex: 1;
}


/* Rest of your existing CSS remains unchanged */

@media (max-width: 991px) {
    .breadcrumb-container {
        display: none; /* Hide breadcrumb on mobile */
    }
    .progress-container .progress {
        width: 100%; /* Full width for the progress bar on its own row */
    }
    .hamburger-menu-button {
        margin-right: auto; /* Push everything else to the right */
    }
    .learnflash-page-header .row > * {
        flex: 0 0 auto; /* Prevents elements from taking full width */
        width: auto; /* Width auto for natural content width */
    }
    .learnflash-page-header .row {
        flex-wrap: nowrap; /* Prevents wrapping of elements */
        align-items: center; /* Align items in a neat row */
    }
}

@media (min-width: 992px) {
    .progress-container .progress {
        width: 80%; /* Reduced width on desktop */
    }
}

/* Ensures accordion button elements are laid out using flexbox */
.accordion-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%; /* Ensure the button stretches full width of its container */
}

/* Style for the module link to allow it to grow and fill space as needed */
.accordion-button .module-link-container {
    flex-grow: 1;
    margin-right: 10px; /* Ensures some space between the module name and progress bar */
}

/* Fixed width for progress and other components */
.accordion-button .progress-container,
.accordion-button .ld-expand-button,
.accordion-button .topics-count {
    flex-shrink: 0; /* Prevents these elements from shrinking */
}

/* Specific styles for the progress bar container */
.accordion-button .progress-container {
    width: 200px; /* Fixed width for progress bar container */
    display: flex;
    justify-content: flex-end; /* Aligns the progress bar to the right */
}

/* Topic count and chevron icon placement */
.accordion-button .topics-count,
.accordion-button .ld-expand-button {
    margin-left: 10px; /* Spacing between elements */
}

/* General responsive adjustments for accordion on mobile */
@media (max-width: 768px) {
    .accordion-button .progress-container {
        width: 80px; /* Significantly reduce width on mobile */
    }

    /* Ensure module link container uses available space efficiently */
    .accordion-button .module-link-container {
        flex-grow: 1;
        white-space: nowrap; /* Prevent module names from breaking */
        overflow: hidden;
        text-overflow: ellipsis; /* Add ellipsis if the text is too long */
    }

    /* Smaller margins and font sizes for mobile */
    .accordion-button .topics-count,
    .accordion-button .ld-expand-button {
        margin-left: 5px; /* Smaller left margin on mobile */
        font-size: 0.8rem; /* Smaller font size for icons and text */
    }

    /* Adjust the font size and padding within the accordion button for better fit */
    .accordion-button {
        padding: 10px 5px; /* Reduce padding to save space */
    }

    /* Hide additional texts or icons if not crucial for mobile view */
    .accordion-button .ld-expand-button i {
        display: none; /* Optionally hide the down chevron on mobile */
    }

    /* Adjust the overall size and layout of progress bars */
    .accordion-button .progress {
        height: 5px; /* Thinner progress bars on mobile */
    }

    /* Reduce size and padding of list items within accordion */
    .accordion-body ul.list-unstyled {
        padding-left: 10px; /* Smaller padding for list items */
    }

    .accordion-body .ld-topic-row {
        padding: 5px 0; /* Reduce vertical padding in list items */
    }
}

/* LearnFlash Course Grid Styles */
.learnflash-course-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.learnflash-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.learnflash-course-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    height: 100%;
    font-family: inherit;
}

.learnflash-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.learnflash-course-card:hover .learnflash-course-title a {
    color: #3e64ff;
}

.learnflash-course-card.locked {
    opacity: 0.85;
}

.learnflash-course-image {
    position: relative;    
    overflow: hidden;
}

.learnflash-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.learnflash-course-card:hover .learnflash-course-image img {
    transform: scale(1.05);
}

.learnflash-course-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.learnflash-course-overlay .lf-icon {
    font-size: 2.5rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.learnflash-course-meta {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 3;
}

.learnflash-course-type,
.learnflash-course-label,
.learnflash-course-new {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.learnflash-course-type {
    background: rgba(62, 100, 255, 0.9);
    color: white;
}

.learnflash-type-video {
    background: rgba(220, 53, 69, 0.9);
}

.learnflash-type-textbasiert {
    background: rgba(40, 167, 69, 0.9);
}

.learnflash-type-mixed {
    background: rgba(255, 193, 7, 0.9);
    color: #212529;
}

.learnflash-course-label {
    background: rgba(108, 117, 125, 0.9);
    color: white;
}

.learnflash-course-new {
    background: rgba(255, 59, 92, 0.9);
    color: white;
    animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-new {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.9;
    }
    50% { 
        transform: scale(1.05);
        opacity: 1;
    }
}

.learnflash-course-content {
    flex-grow: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.learnflash-progress-container {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
}

.learnflash-progress-circle {
    position: relative;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.learnflash-progress-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    transform: rotate(-90deg);
}

.learnflash-progress-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 3;
}

.learnflash-progress-bar {
    fill: none;
    stroke: #28a745;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.learnflash-course-card:hover .learnflash-progress-bar {
    stroke: #20a845;
}

.learnflash-progress-text {
    font-size: 0.7rem;
    font-weight: 700;
    color: #495057;
    z-index: 1;
}

.learnflash-course-title {
    margin: 0 0 0 0;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
    font-family: inherit;
}

.learnflash-course-title a {
    color: #212529;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    font-family: inherit;
    transition: color 0.2s ease;
}

.learnflash-course-title a:hover {
    color: #3e64ff;
}

.learnflash-course-footer {
    padding: 0 20px 20px;
    margin-top: auto;
}

.learnflash-course-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.learnflash-course-button.primary {
    background: linear-gradient(135deg, #3e64ff, #2a4cd2);
    color: white;
    box-shadow: 0 4px 12px rgba(62, 100, 255, 0.3);
}

.learnflash-course-button.primary:hover {
    background: linear-gradient(135deg, #2a4cd2, #1a3bb8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(62, 100, 255, 0.4);
    color: white;
}

.learnflash-course-button.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.learnflash-course-button.secondary:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .learnflash-course-grid-container {
        padding: 15px;
    }
    
    .learnflash-course-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .learnflash-course-image {
        height: 180px;
    }
    
    .learnflash-progress-container {
        top: 10px;
        right: 10px;
    }
    
    .learnflash-progress-circle {
        width: 45px;
        height: 45px;
    }
    
    .learnflash-progress-svg {
        width: 45px;
        height: 45px;
    }
    
    .learnflash-course-content {
        padding: 12px 15px;
    }
    
    .learnflash-course-footer {
        padding: 0 15px 15px;
    }
}

@media (max-width: 576px) {
    .learnflash-course-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .learnflash-course-meta {
        top: 8px;
        left: 8px;
        right: 8px;
    }
    
    .learnflash-course-type,
    .learnflash-course-label,
    .learnflash-course-new {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .learnflash-course-title a {
        font-size: 1rem;
    }
    
    .learnflash-course-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* === Continue Where You Left Off Widget === */
.learnflash-continue-widget {
    margin: 20px 0;
}

.continue-compact {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.continue-compact .continue-label {
    font-size: 0.85rem;
    color: #666;
    min-width: 120px;
}

.continue-compact .continue-content {
    flex: 1;
}

.continue-compact h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.continue-compact p {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: #666;
}

.continue-compact .time-remaining {
    font-size: 0.8rem;
    color: #0055ff;
}

.continue-compact .continue-btn {
    background: #0055ff;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.continue-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.continue-card .continue-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.continue-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.continue-card p {
    margin: 0 0 16px 0;
    color: #666;
    line-height: 1.4;
}

.continue-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-remaining {
    font-size: 0.85rem;
    color: #0055ff;
    font-weight: 500;
}

.continue-btn {
    background: #0055ff;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.continue-btn:hover {
    background: #0044cc;
    color: white;
    text-decoration: none;
}

/* General button styles to replace Bootstrap */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #0055ff;
    border-color: #0055ff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0044cc;
    border-color: #0044cc;
    color: #fff;
    text-decoration: none;
}

.btn-primary:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 85, 255, 0.25);
}

/* Card styles to replace Bootstrap */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    padding: 1.25rem;
}

/* Utility class to replace Bootstrap ms-auto */
.ms-auto {
    margin-left: auto !important;
}

/* Progress bar styles to replace Bootstrap */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #0d6efd;
    transition: width 0.6s ease;
}

.continue-detailed {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.continue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.continue-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-progress .progress {
    width: 120px;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.course-progress .progress-bar {
    height: 100%;
    background: #0055ff;
    border-radius: 3px;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* === Progress Overview Widget === */
.learnflash-progress-overview {
    margin: 20px 0;
}

.progress-streak {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.progress-streak h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.streak-info {
    display: flex;
    gap: 16px;
    align-items: center !important;
}

.streak-current {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0055ff;
}

.streak-best {
    font-size: 0.9rem;
    color: #666;
}

.courses-progress-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-progress-compact {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    gap: 12px;
}

.course-progress-compact .course-name {
    flex: 1;
    min-width: 0;
}

.course-progress-compact .course-name a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.progress-mini {
    width: 80px;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.progress-mini .progress-bar {
    height: 100%;
    background: #0055ff;
    border-radius: 2px;
}

.progress-percentage {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    min-width: 35px;
    text-align: right;
}

.courses-progress-detailed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.course-progress-item {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    gap: 16px;
    align-items: center;
}

.course-progress-item .course-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.course-progress-item .course-info {
    flex: 1;
}

.course-progress-item h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.course-progress-item h4 a {
    text-decoration: none;
    color: #333;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar-container .progress {
    flex: 1;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-container .progress-bar {
    height: 100%;
    background: #0055ff;
    border-radius: 3px;
}

/* === Streak Widget === */
.learnflash-streak-widget {
    margin: 20px 0;
}

.streak-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: inline-flex;
}

.streak-icon {
    font-size: 1.2rem;
}

.streak-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.streak-detailed {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.streak-detailed h3 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

.streak-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.streak-current,
.streak-best {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.streak-stats .streak-number {
    font-size: 2rem;
    font-weight: 700;
    color: #0055ff;
    line-height: 1;
}

.streak-stats .streak-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* === Responsive Styles for New Widgets === */
@media (max-width: 768px) {
    .continue-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .continue-compact .continue-label {
        min-width: auto;
    }
    
    .continue-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .continue-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .course-progress-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .course-progress-item .course-image {
        width: 100%;
        height: 120px;
    }
    
    .streak-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .streak-stats {
        gap: 20px;
    }
    
    .streak-stats .streak-number {
        font-size: 1.5rem;
    }
}
