/* User Greeting Styles */
.lemlinklms-user-greeting {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 15px;
    font-size: 13px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.lemlinklms-user-greeting .user-greeting-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}


.lemlinklms-user-greeting .instructor-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.lemlinklms-user-greeting .user-greeting-actions {
    white-space: nowrap;
}

.lemlinklms-user-greeting .lemlinklms-logout-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.lemlinklms-user-greeting .lemlinklms-logout-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lemlinklms-user-greeting {
        font-size: 12px;
        padding: 6px 12px;
        text-align: center;
        justify-content: center;
    }
    
    .lemlinklms-user-greeting .user-greeting-actions {
        margin-top: 4px;
    }
}

/* Main Container */
.lemlinklms-course-menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Course Title */
.course-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 600;
}

/* Course Navigation */
.course-navigation {
    margin-bottom: 20px;
}

/* Course Main Title */
.course-main-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.back-to-courses {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #f0f0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-courses:hover {
    background: #e0e0e1;
    transform: translateX(-5px);
}

/* Single Course Page Lessons Grid - Smaller tiles */
.single-course .lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.single-course .lesson-card {
    font-size: 0.9em;
}

.single-course .lesson-thumbnail {
    padding-top: 45%; /* Smaller aspect ratio */
}

.single-course .lesson-title {
    margin: 10px 10px 8px;
    font-size: 1em;
}

.single-course .lesson-meta {
    padding: 0 10px 10px;
    font-size: 0.8em;
}

/* Lessons Grid */
.lemlinklms-course-menu .lessons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 80px !important;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

/* Medium viewport: Force 2 columns */
@media (min-width: 768px) {
    .lemlinklms-course-menu .lessons-grid {
        grid-template-columns: repeat(2, minmax(280px, 400px));
        justify-content: center;
        gap: 70px !important;
    }
}

/* Wide viewport: Force 3 columns */
@media (min-width: 1200px) {
    .lemlinklms-course-menu .lessons-grid {
        grid-template-columns: repeat(3, minmax(300px, 400px));
        justify-content: center;
        gap: 70px !important;
    }
}

/* Lesson Card */
.lesson-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.lesson-card.completed {
    border-left: 4px solid #4CAF50;
}

/* Lesson Thumbnail */
.lesson-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #f5f7fa;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lesson-thumbnail.no-thumbnail {
    background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
    color: white;
}

.lesson-number {
    font-size: 3em;
    font-weight: bold;
    opacity: 0.8;
}

.completion-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Lesson Content */
.lesson-title {
    margin: 15px 15px 10px;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    flex-grow: 1;
}

.lesson-meta {
    padding: 0 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #7f8c8d;
}

.completion-count {
    display: inline-flex;
    align-items: center;
}

.completion-count:before {
    content: '✓';
    margin-right: 5px;
    color: #4CAF50;
    font-size: 1.1em;
}

/* Email Modal */
.lemlinklms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lemlinklms-modal.show {
    display: flex !important;
}

.lemlinklms-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

.lemlinklms-modal h3 {
    margin-top: 0;
    color: #2c3e50;
    margin-bottom: 15px;
}

.lemlinklms-modal p {
    margin-bottom: 20px;
    color: #555;
}

.lemlinklms-modal input[type="email"],
.lemlinklms-modal input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.lemlinklms-modal .additional-fields {
    margin-bottom: 15px;
}

.lemlinklms-modal .additional-fields input {
    margin-bottom: 10px;
}

.lemlinklms-modal .additional-fields input:last-child {
    margin-bottom: 15px;
}

.lemlinklms-modal .button {
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    text-decoration: none;
    text-align: center;
    display: block;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.lemlinklms-modal .button.primary {
    background: #4CAF50;
    color: white;
}

.lemlinklms-modal .button.primary:hover {
    background: #3e8e41;
}

.lemlinklms-modal .button.secondary {
    background: #6c757d;
    color: white;
}

.lemlinklms-modal .button.secondary:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

.modal-actions {
    margin-top: 15px;
}

.lemlinklms-modal .small {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 15px;
    display: block;
}

/* Complete Button */
.lemlinklms-complete-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    max-width: 300px;
    margin: 20px 0;
}

.lemlinklms-complete-button:hover:not(:disabled) {
    background: #3e8e41;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.lemlinklms-complete-button:disabled,
.lemlinklms-complete-button.disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.lemlinklms-complete-button.survey-completed {
    background: #8bc34a;
    cursor: default;
    transform: none;
}

.survey-requirement-notice,
.video-requirement-notice {
    margin-top: 10px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-size: 0.9em;
    text-align: center;
}

.video-requirement-notice {
    background: #cfe2ff;
    border-color: #b6d4fe;
    color: #084298;
}

.timer-text {
    font-family: monospace;
    font-size: 1.1em;
}

.time-remaining {
    font-weight: bold;
    color: #084298;
}

/* Lesson Template Specific Styles */
.lemlinklms-lesson {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Lesson Navigation Button */
.lesson-navigation-top {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.back-to-course-btn,
.back-to-home-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.back-to-home-btn {
    background: #6c757d;
}

.back-to-course-btn:hover,
.back-to-home-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: white;
}

.back-to-course-btn:hover {
    background: #3e8e41;
}

.back-to-home-btn:hover {
    background: #5a6268;
}

/* Lesson Main Title */
.lesson-main-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 20px 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

/* Hide the default WordPress title on lesson pages */
.single-lesson .entry-title,
.single-lesson h1.entry-title {
    display: none;
}

.lemlinklms-lesson .entry-header,
.lemlinklms-lesson .entry-content,
.lemlinklms-lesson .lesson-footer {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.lemlinklms-lesson .course-breadcrumb {
    margin-bottom: 15px;
}

/* Ensure content respects theme containers */
.wrap .lemlinklms-lesson,
.container .lemlinklms-lesson,
.content-area .lemlinklms-lesson {
    padding-left: 0;
    padding-right: 0;
}

.wrap .lemlinklms-lesson .entry-header,
.wrap .lemlinklms-lesson .entry-content,
.wrap .lemlinklms-lesson .lesson-footer,
.container .lemlinklms-lesson .entry-header,
.container .lemlinklms-lesson .entry-content,
.container .lemlinklms-lesson .lesson-footer {
    padding-left: 20px;
    padding-right: 20px;
}

.lemlinklms-lesson .course-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.lemlinklms-lesson .course-link:hover {
    color: #4CAF50;
}

.lemlinklms-lesson .lesson-status.completed {
    margin: 15px 0;
}

.lemlinklms-lesson .completion-badge {
    background: #4CAF50;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 600;
}

.lesson-survey-section {
    margin: 40px 0;
    padding: 30px;
    background: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.lesson-survey-section h3 {
    margin-top: 0;
    color: #1976D2;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.lesson-survey-section p {
    color: #666;
    margin-bottom: 20px;
}

.lesson-completion-section {
    margin: 40px 0;
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.lesson-completed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2em;
    color: #4CAF50;
    font-weight: 600;
}

.lesson-completed .completion-icon {
    background: #4CAF50;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.lesson-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.lesson-navigation .nav-left,
.lesson-navigation .nav-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lesson-navigation .nav-right {
    align-items: flex-end;
    text-align: right;
}

.next-lesson-title {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    max-width: 300px;
}

.lesson-navigation .button {
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.lesson-navigation .button.primary {
    background: #4CAF50;
    color: white;
}

.lesson-navigation .button.primary:hover {
    background: #3e8e41;
    transform: translateY(-1px);
}

.lesson-navigation .button.secondary {
    background: #6c757d;
    color: white;
}

.lesson-navigation .button.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .lesson-navigation {
        flex-direction: column;
    }
    
    .lesson-navigation .button {
        width: 100%;
        text-align: center;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .lessons-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .lemlinklms-modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .lessons-grid {
        grid-template-columns: 1fr;
    }
    
    .course-title {
        font-size: 1.8em;
    }
}

/* Custom Comments Section */
.lemlinklms-comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.lemlinklms-comments-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
}

.comments-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.comment-count {
    font-size: 1.1em;
    color: #666;
}

/* Comment Form */
.comment-form-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    box-sizing: border-box;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.commenting-as {
    font-size: 0.9em;
    color: #666;
}

.commenting-as strong {
    color: #333;
}

.submit-comment {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-comment:hover {
    background: #3e8e41;
    transform: translateY(-1px);
}

.submit-comment:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Comments List */
.comments-list {
    margin-top: 30px;
}

.no-comments {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 0;
}

/* Individual Comment */
.lemlinklms-comment {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.lemlinklms-comment:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lemlinklms-comment.instructor-comment {
    border-left: 4px solid #2196F3;
    background: #f0f8ff;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.instructor-badge {
    display: inline-block;
    background: #2196F3;
    color: white;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: normal;
    vertical-align: middle;
}

.comment-time {
    font-size: 0.85em;
    color: #999;
}

.comment-text {
    color: #333;
    line-height: 1.6;
    word-wrap: break-word;
}

.comment-actions {
    margin-top: 10px;
    text-align: right;
}

.delete-comment {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 0.85em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.delete-comment:hover {
    background: #dc3545;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .comment-form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .submit-comment {
        width: 100%;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Other Courses Section */
.other-courses-title {
    margin-top: 60px;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

.other-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.course-thumbnail {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.course-thumbnail.no-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.course-title-overlay {
    text-align: center;
}

.course-thumbnail.no-thumbnail h3 {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.course-info {
    padding: 20px;
    flex-grow: 1;
}

.course-info .course-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.course-meta {
    margin-bottom: 12px;
}

.course-meta .lesson-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.course-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 12px 0 0 0;
}

/* Responsive adjustments for other courses */
@media (max-width: 768px) {
    .other-courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .other-courses-title {
        font-size: 24px;
        margin-top: 40px;
    }
}

/* Course Quiz Sections (Pre and Post) */
.course-quiz-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid #f0f0f0;
}

.course-pre-quiz {
    border-top: none;
    padding-top: 0;
}

.quiz-milestone {
    text-align: center;
    margin-bottom: 30px;
}

.milestone-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.pre-quiz-badge {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.post-quiz-badge {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.lesson-survey-badge {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

/* Lesson Survey Section - Minimal Styling */
.lesson-survey-section {
    margin: 30px 0;
}

.lesson-survey-section .milestone-badge {
    display: block;
    margin-bottom: 20px;
    width: fit-content;
}

/* Override LemlinkQuiz CSS for lesson survey containers */
.lesson-survey-section .lesson-quiz-container .lemlinkquiz-container {
    background: transparent !important;
    border: none !important;
    border-left: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.quiz-milestone-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.quiz-card.special-quiz {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-card.special-quiz:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.quiz-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quiz-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #2271b1;
}

.course-post-quiz .quiz-icon .dashicons {
    color: #7b1fa2;
}

.lesson-survey-section .quiz-icon .dashicons {
    color: #ff9800;
}

.quiz-content {
    flex: 1;
}

.quiz-content .quiz-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.quiz-content .quiz-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.quiz-content .button {
    background: #2271b1;
    color: white;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.quiz-content .button:hover {
    background: #1e5a8e;
    color: white;
}

/* Quiz Completion Styles */
.quiz-card.quiz-completed {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border: 2px solid #4caf50;
}

.quiz-card.quiz-completed:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.2);
}

.quiz-card.quiz-completed .quiz-icon {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
}

.quiz-card.quiz-completed .quiz-icon .completed-checkmark {
    color: white;
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.quiz-content .completion-status {
    color: #2e7d32;
    font-size: 16px;
    font-weight: 600;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.quiz-content .button.button-secondary {
    background: #6c757d;
    color: white;
}

.quiz-content .button.button-secondary:hover {
    background: #5a6268;
    color: white;
}

/* Quiz Meta Information */
.quiz-meta-info {
    margin: 15px 0;
    padding: 10px 0;
}

.quiz-question-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border: 1px solid #e9ecef;
}

.quiz-question-count .info-icon {
    font-size: 16px;
}

/* Auto Display Message */
.quiz-auto-display {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
    display: inline-block;
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}

.quiz-completed-no-retake {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
    display: inline-block;
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Quiz Active State */
.quiz-card.quiz-active {
    border: 2px solid #2271b1;
    box-shadow: 0 15px 40px rgba(34, 113, 177, 0.2);
}

/* Quiz Containers */
.lesson-quiz-container,
.course-quiz-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.lesson-quiz-container .lemlinkquiz-container,
.course-quiz-container .lemlinkquiz-container {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: none;
}

.course-post-quiz .quiz-content .button {
    background: #7b1fa2;
}

.course-post-quiz .quiz-content .button:hover {
    background: #6a1b9a;
}

/* Responsive design for quiz sections */
@media (max-width: 768px) {
    .quiz-card.special-quiz {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .quiz-icon {
        width: 70px;
        height: 70px;
    }
    
    .quiz-icon .dashicons {
        font-size: 35px;
        width: 35px;
        height: 35px;
    }
    
    .quiz-milestone-title {
        font-size: 24px;
    }
    
    .quiz-content .quiz-title {
        font-size: 20px;
    }
    
    .quiz-content .quiz-description {
        font-size: 15px;
    }
}

/* External Tiles Shortcode */
.lemlinklms-external-tiles {
    margin: 30px 0;
}

.lemlinklms-external-tiles.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin: 0 auto;
    padding: 0;
    max-width: 1200px;
}

/* External tile card styles */
.external-tile-card {
    display: block;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    position: relative;
    max-width: 200px;
    justify-self: center;
    width: 100%;
}

.external-tile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* External tile thumbnail */
.external-tile-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #f5f7fa;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* External tile title */
.external-tile-title {
    margin: 10px;
    font-size: 0.9em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2;
}

/* Responsive columns based on data-columns attribute */
@media (min-width: 768px) {
    .lemlinklms-external-tiles[data-columns="2"] {
        grid-template-columns: repeat(2, minmax(150px, 200px));
        justify-content: center;
    }
    
    .lemlinklms-external-tiles[data-columns="3"] {
        grid-template-columns: repeat(3, minmax(150px, 200px));
        justify-content: center;
        gap: 25px;
    }
    
    .lemlinklms-external-tiles[data-columns="4"] {
        grid-template-columns: repeat(4, minmax(150px, 200px));
        justify-content: center;
        gap: 20px;
    }
}

/* External link badge */
.external-link-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #555;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.external-link-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

.external-tile-card:hover .external-link-badge {
    background: #4CAF50;
    color: white;
    transform: scale(1.1);
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .lemlinklms-external-tiles.lessons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .external-tile-card {
        max-width: 100%;
    }
}
