:root {
    --cce-red: #a81010;
    --cce-red-dark: #7d0c0c;
    --cce-black: #0a0a0a;
    --cce-light: #f5f5f5;
    --cce-white: #ffffff;

    --cce-radius: 10px;

    --cce-shadow:
        0 2px 10px rgba(0,0,0,0.08);

    --cce-heading-font:
        'PT Serif', Helvetica, Arial, sans-serif;

    --cce-body-font:
        'Open Sans', Helvetica, Arial, sans-serif;
}

/* ========================================
   DASHBOARD LAYOUT
======================================== */

.cce-dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--cce-light);
    font-family: var(--cce-body-font);
}

/* ========================================
   SIDEBAR
======================================== */

.cce-dashboard-sidebar {
    width: 260px;
    background: var(--cce-black);
    color: var(--cce-white);
    padding: 30px 20px;
}

.cce-dashboard-sidebar h2 {
    color: var(--cce-white);
    margin-bottom: 30px;
    font-family: var(--cce-heading-font);
    font-size: 32px;
    line-height: 1.2;
}

.cce-dashboard-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cce-dashboard-sidebar li {
    margin-bottom: 15px;
}

.cce-dashboard-sidebar a,
.cce-dashboard-sidebar a:visited,
.cce-dashboard-sidebar a:hover,
.cce-dashboard-sidebar a:active {

    color: var(--cce-white) !important;
    text-decoration: none !important;

    display: block;
    padding: 12px 15px;

    border-radius: 6px;

    transition: 0.3s;

    font-weight: 600;

    font-family: var(--cce-body-font);
}

.cce-dashboard-sidebar a:hover {
    background: var(--cce-red);
}

/* ========================================
   MAIN CONTENT
======================================== */

.cce-dashboard-content {
    flex: 1;
    padding: 40px;
    background: var(--cce-light);
}

.cce-dashboard-card {
    background: var(--cce-white);

    border-radius: var(--cce-radius);

    padding: 20px;

    margin-bottom: 20px;

    box-shadow: var(--cce-shadow);
}

.cce-dashboard-card h1 {
    margin: 0;

    font-family: var(--cce-heading-font);

    color: var(--cce-black);

    font-size: 48px;
}

/* ========================================
   COURSE GRID
======================================== */

.cce-course-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(250px, 1fr));

    gap: 20px;

    align-items: start;
}

/* ========================================
   COURSE CARD
======================================== */

.cce-course-card {

    background: var(--cce-white);

    border-radius: var(--cce-radius);

    overflow: hidden;

    box-shadow: var(--cce-shadow);

    transition: 0.3s;

    display: flex;
    flex-direction: column;
}

.cce-course-card:hover {
    transform: translateY(-3px);
}

.cce-course-card img {
    width: 100%;
    height: auto;
    display: block;
}

.cce-course-card-content {

    padding: 20px;

    display: flex;

    flex-direction: column;

    
}

.cce-course-card-content h3 {
    margin-top: 0;

    font-family: var(--cce-heading-font);

    color: var(--cce-black);

    font-size: 28px;
}

.cce-course-description {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* ========================================
   BUTTONS
======================================== */

.cce-course-button,
.cce-course-button:visited,
.cce-course-button:hover,
.cce-course-button:active {

    display: block;

    width: 100%;

    background: var(--cce-red);

    color: var(--cce-white) !important;

    padding: 14px 18px;

    border-radius: 5px;

    text-decoration: none !important;

    font-weight: 600;

    font-family: var(--cce-body-font);

    text-align: center;

    transition: 0.3s;

    box-sizing: border-box;
}

.cce-course-button:hover {
    background: var(--cce-red-dark);
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 1024px) {

    .cce-dashboard-sidebar {
        display: none;
    }

    .cce-dashboard-content {
        width: 100%;
        padding: 20px;
    }

    .cce-dashboard-wrapper {
        display: block;
    }

}

/* ========================================
   account settings
======================================== */


.cce-account-settings {
    background: #fff;
    border: 2px solid #000;
    padding: 30px;
    border-radius: 10px;
    max-width: 700px;
}

.cce-account-settings h2,
.cce-account-settings h3 {
    color: #a81010;
    margin-bottom: 20px;
}

.cce-form-group {
    margin-bottom: 20px;
}

.cce-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.cce-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #000;
    border-radius: 5px;
}

.cce-account-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

.cce-account-btn:hover {
    background: #a81010;
}

.cce-account-success {
    background: #e9f9ec;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin-bottom: 20px;
    font-weight: 600;
}

.cce-account-error {
    background: #fff0f0;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ========================================
   Register
======================================== */

.cce-register-box {
    max-width: 550px;
    margin: 40px auto;
    padding: 35px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 10px;
}

.cce-register-box h2 {
    color: #a81010;
    margin-bottom: 25px;
    text-align: center;
}

.cce-register-form label {
    font-weight: 700;
    color: #000;
}

.cce-register-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #999;
    border-radius: 5px;
}

.cce-register-button {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #a81010;
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.cce-register-button:hover {
    background: #000;
}

.cce-register-error {
    padding: 12px;
    margin-bottom: 20px;
    background: #a81010;
    color: #fff;
}

.cce-register-success {
    padding: 12px;
    margin-bottom: 20px;
    background: #000;
    color: #fff;
}

/* ========================================
   Login
======================================== */

.cce-login-box {
    max-width: 550px;
    margin: 40px auto;
    padding: 35px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 10px;
}

.cce-login-box h2 {
    color: #a81010;
    margin-bottom: 25px;
    text-align: center;
}

.cce-login-form label {
    font-weight: 700;
    color: #000;
}

.cce-login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #999;
    border-radius: 5px;
    margin-bottom: 15px;
}

.cce-login-form input:focus {
    outline: none;
    border-color: #a81010;
    box-shadow: 0 0 5px rgba(168,16,16,.3);
}

.cce-login-button {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #a81010;
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.cce-login-button:hover {
    background: #000;
}

.cce-login-error {
    padding: 12px;
    margin-bottom: 20px;
    background: #a81010;
    color: #fff;
}

.cce-login-links {
    margin-top: 20px;
    text-align: center;
}

.cce-login-links a {
    color: #a81010;
    font-weight: 700;
    text-decoration: none;
}

.cce-login-links a:hover {
    color: #000;
}

/* Hide WordPress admin bar for logged-in non-admin users */

body:not(.admin-bar) {
    margin-top: 0 !important;
}

body.admin-bar:not(.role-administrator) #wpadminbar {
    display: none !important;
}

body.admin-bar:not(.role-administrator) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =========================================================
   PLAYER LAYOUT all below here
========================================================= */

.cce-player-layout {
    display: flex;
    min-height: 100vh;
}

/* =========================================================
   SIDEBAR
========================================================= */

.cce-player-sidebar {
    width: 320px;
    background: #0a0a0a;
    color: #fff;
    padding: 30px 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.cce-player-title {
    color: #fff;
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #a81010;
}

.cce-module-group {
    margin-bottom: 35px;
}

.cce-module-title {
    color: #fff;
    font-size: 20px;
    margin-bottom: 15px;
}

.cce-lesson-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cce-lesson-item {
    margin-bottom: 8px;
}

.cce-lesson-item a {
    display: block;
    padding: 12px 15px;
    color: #ddd;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    transition: 0.2s ease;
}

.cce-lesson-item a:hover {
    background: #242424;
    color: #fff;
}

.cce-lesson-item.active-lesson a {
    background: #a81010;
    color: #fff;
    font-weight: 600;
}

/* =========================================================
   CONTENT COLUMN
========================================================= */

.cce-player-content {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 991px) {

    .cce-player-layout {
        flex-direction: column;
    }

    .cce-player-sidebar {
        width: 100%;
    }

}

/* =========================================================
   MOBILE MENU
========================================================= */

.cce-mobile-menu-toggle {
    display: none;
    width: 100%;
    padding: 15px;
    background: #0a0a0a;
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================================
   MOBILE SIDEBAR
========================================================= */

@media (max-width: 991px) {

    .cce-player-layout {
        flex-direction: column;
    }

    .cce-mobile-menu-toggle {
        display: block;
    }

    .cce-player-sidebar {
        
        width: 100%;
        max-height: 70vh;
        overflow-y: auto;
    }

    .cce-player-sidebar.active {
        display: block;
    }

}
/* =========================================================
   Lesson CSS
========================================================= */
.cce-player-layout {
    display: flex;
    align-items: stretch;
}

.cce-player-content {
    flex: 1;
    width: 100%;
}

.cce-lesson-content {
    width: 100%;
}

.cce-lesson-content .elementor {
    width: 100% !important;
    max-width: 100% !important;
}

/* =========================================================
   GRADEBOOK
========================================================= */

.cce-gradebook {

    background: #fff;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 30px;
    margin-top: 20px;

}

.cce-gradebook h2 {

    color: #a81010;
    margin-bottom: 5px;
    font-size: 32px;

}

.cce-course-title {

    margin-top: 0;
    margin-bottom: 25px;
    color: #666;
    font-weight: normal;

}

/* =========================================================
   TABLE
========================================================= */

.cce-gradebook-table {

    width: 100%;
    border-collapse: collapse;
    background: #fff;

}

.cce-gradebook-table thead tr {

    background: #000;
    border-bottom: 3px solid #a81010;

}

.cce-gradebook-table th {

    padding: 16px;
    color: #fff;
    text-align: left;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .5px;

}

.cce-gradebook-table td {

    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    font-size: 15px;

}

.cce-gradebook-table tbody tr {

    transition: .2s ease;

}

.cce-gradebook-table tbody tr:hover {

    background: #fafafa;

}

/* =========================================================
   STATUS BADGES
========================================================= */

.cce-pass,
.cce-fail,
.cce-not-taken {

    display: inline-block;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;

}

.cce-pass {

    background: #e9f9ec;
    color: #28a745;

}

.cce-fail {

    background: #fff0f0;
    color: #dc3545;

}

.cce-not-taken {

    background: #f1f1f1;
    color: #777;

}

/* =========================================================
   SCORE
========================================================= */

.cce-gradebook-score {

    font-size: 18px;
    font-weight: 700;
    color: #000;

}

/* =========================================================
   BUTTONS
========================================================= */

.cce-gradebook .button,
.cce-gradebook .button-primary,
.cce-gradebook .button-secondary {

    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 700;
    text-transform: uppercase;
    transition: .2s ease;
    cursor: pointer;

}

.cce-gradebook .button:hover,
.cce-gradebook .button-primary:hover,
.cce-gradebook .button-secondary:hover {

    background: #a81010;
    color: #fff;

}

/* =========================================================
   GRADE EDIT INPUT
========================================================= */

.cce-gradebook input[type="number"] {

    width: 90px;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 6px;
    font-weight: 600;

}

.cce-gradebook input[type="number"]:focus {

    outline: none;
    border-color: #a81010;
    box-shadow: 0 0 5px rgba(168,16,16,.25);

}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width: 768px) {

    .cce-gradebook {

        padding: 20px;
        overflow-x: auto;

    }

    .cce-gradebook-table {

        min-width: 700px;

    }

}

/* =========================================
   COURSE DASHBOARD MENU
========================================= */

.cce-course-dashboard-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.cce-dashboard-menu-btn {
    background: #000;
    color: #fff;
    padding: 14px 22px;
    border-radius: 6px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    border: 2px solid #000;
    transition: 0.2s ease;
}

.cce-dashboard-menu-btn:hover {
    background: #a81010;
    border-color: #a81010;
    color: #fff;
    text-decoration: none;
}