/*
 * Modern LMS styling for single class pages.
 */

/* Main container and layout */
.modern-lms-container {
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
}

.class-article {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding: 30px;
    align-items: start;
}

.class-main-content {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.class-sidebar {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    position: sticky;
    top: 2rem;
}

.class-curriculum-fullwidth {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.container-class-curriculum {
    max-width: 1735px;
    margin: 0 auto;
    padding: 10px 30px 30px;
}

/* Header and Content */
.class-header .class-title {
    font-size: 1.8em;
    margin: 0 0 1em;
    color: #333;
}

.class-thumbnail {
    margin-bottom: 20px;
}

.class-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.class-content p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
}

/* Responsive video and embeds */
.class-content iframe,
.class-content video,
.class-content embed,
.class-content object {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Sidebar Widgets */
.class-enrollment-box,
.class-details-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.class-details-box {
    margin-bottom: 0;
}


.class-details-box .details-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.class-details-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Adds vertical space between list items */
}

.class-details-box ul li {
    color: #555;
    display: flex;
    align-items: flex-start;
    /* Align items to the top */
    gap: 12px;
    /* Space between icon and text */
}

.class-details-box ul li i {
    color: #0073aa;
    font-size: 1.1em;
    margin-top: 3px;
    /* Align icon with the first line of text */
    width: 22px;
    text-align: center;
}

.class-details-box ul li a {
    font-weight: 500;
    color: #005a87;
    text-decoration: none;
}

.class-details-box ul li a:hover {
    text-decoration: underline;
}

/* Enrollment and Progress Bar */
.user-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Adds space between the progress bar and the button */
}

.user-progress-wrapper .progress-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-bar-background {
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
}

.progress-bar-foreground {
    background-color: #4caf50;
    height: 100%;
}

.continue-learning-button,
#enroll-class-button {
    width: 100%;
    text-align: center;
    /* margin-top: 15px; */
    /* Removed to prevent overflow */
    padding: 12px;
    font-size: 0.9em;
    box-sizing: border-box;
    /* Ensures padding is included in the width */
}

/* Curriculum Section */
.curriculum-sections .section-title {
    cursor: pointer;
    padding: 15px;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.curriculum-sections .section-title:hover {
    background-color: #e0e0e0;
}

.curriculum-sections .section-title i {
    transition: transform 0.3s;
}

.curriculum-sections .section-title[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.section-content {
    padding: 15px;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.curriculum-lessons {
    list-style: none;
    padding-left: 0;
}

.curriculum-lessons li {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #244d8b;
    transition: background-color 0.2s, padding-left 0.2s;
    font-weight: 500;
}

.curriculum-lessons li i {
    margin-right: 10px;
}

.curriculum-lessons li a:hover {
    background-color: #f9f9f9;
    padding-left: 20px;
}

.curriculum-lessons li a:hover {
    background-color: #f9f9f9;
}

.curriculum-lessons li a i {
    margin-right: 8px;
    color: #0073aa;
}

.class-curriculum-fullwidth h2 {
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .class-article {
        display: flex;
        flex-direction: column-reverse;
    }

    .class-main-content,
    .class-sidebar,
    .class-curriculum-fullwidth {
        grid-column: 1 / -1;
        padding: 25px;
    }

    .class-sidebar {
        order: -1;
        /* Move sidebar above content on smaller screens */
        grid-row: 1;
        padding: 0;
        width: 100%;
        /* Explicitly set the row */
    }

    .class-main-content {
        grid-row: 2;
        /* Explicitly set the row */
    }

    .class-header .class-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .class-article {
        padding: 15px;
        gap: 20px;
    }

    .container-class-curriculum {
        padding: 10px 15px 20px;
    }

    .class-header .class-title {
        font-size: 1.8em;
    }

    .class-content p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .class-header .class-title {
        font-size: 1.5em;
    }

    .curriculum-sections .section-title {
        padding: 12px;
        font-size: 1em;
    }
}

.price-description {
    margin-bottom: 15px;
}

.price-description p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* Modern Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quantity-selector label {
    font-weight: 500;
    color: #555;
}

.quantity-input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    -moz-appearance: textfield;
    /* Firefox */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Custom Price Styling */
.price del,
.price-header del {
    font-size: 0.9em;
    margin-right: 8px;
}

.price ins,
.price-header ins {
    text-decoration: none;
    font-weight: bold;
    color: #d63638;
    /* A sale color */
    background-color: #fde8e8;
    /* A light red background */
    padding: 4px 6px;
    border-radius: 4px;
}

.price .woocommerce-Price-amount.amount,
.price-header .woocommerce-Price-amount.amount {
    font-weight: bold;
    color: #8bc34a;
}

/* Styling for the modal */
.pricing-option-item .price-header span {
    font-size: 1.1em;
}

/* Styling for the Learning Levels */
.class-details-box .price {
    font-size: 1.1em;
}

.level-meta .fas {
    color: #007cba;
    margin-right: 5px;
}

.level-meta span {
    display: inline-block;
    margin-bottom: 3px;
}

/* Learning Levels Link Styling */
.class-details-box a {
    color: #007cba;
    text-decoration: none;
}

.class-details-box a:hover {
    color: #005a87;
    text-decoration: underline;
}