/* Checkout Prerequisites Courses Styles */

/* Course Content */
.learndash-content-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 5px;
}

.course-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/* Course Progress */
.course-progress {
    margin-top: 25px;
    position: relative;
}

.progress-fraction {
    display: block;
    text-align: right;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.progress-bar {
    position: relative;
    background: #f0f0f0;
    border-radius: 8px;
    height: 24px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, #43A047, #4CAF50);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    transition: width 0.3s ease;
}

.progress-percentage {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    z-index: 2;
    color: #333;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(255,255,255,0.5);
}

/* Lesson List */
.ld-lesson-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ld-lesson-item, 
.ld-topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.ld-lesson-item:hover, 
.ld-topic-item:hover {
    background: #f9f9f9;
    border-color: #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.ld-lesson-item.completed, 
.ld-topic-item.completed {
    border-color: #4CAF50;
    background: #f1f8e9;
}

.ld-lesson-item.completed:hover, 
.ld-topic-item.completed:hover {
    background: #e8f5e8;
}

/* Topics styling */
.ld-topic-list {
    margin-left: 30px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.ld-topic-item {
    background: #fafafa;
    border-left: 3px solid #eee;
}

.ld-topic-item.completed {
    border-left-color: #4CAF50;
}

.ld-lesson-title, 
.ld-topic-title {
    flex: 1;
}

.lesson-title-text, 
.topic-title-text {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    pointer-events: none;
}

.topic-title-text {
    font-weight: normal;
    font-size: 0.95em;
}

.ld-lesson-item:hover .lesson-title-text,
.ld-topic-item:hover .topic-title-text {
    color: #0073aa;
}

.ld-lesson-status, 
.ld-topic-status {
    margin-left: 15px;
    pointer-events: none;
}

.ld-lesson-status .completed, 
.ld-topic-status .completed {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 14px;
}

/* Lesson Content Display */
.lesson-header {
    margin-bottom: 30px;
}

.lesson-header h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.lesson-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.lesson-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.lesson-content {
    margin-bottom: 40px;
    line-height: 1.6;
    color: #444;
}

/* SIMPLIFIED COMPLETION STATUS - At bottom of content */
.completion-status {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

/* Unified Button Styles */
.mark-complete-button,
.completed-return-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 240px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Mark Complete Button (Red/Action) */
.mark-complete-button {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 2px solid #dc3545;
}

.mark-complete-button:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.mark-complete-button:disabled {
    background: rgba(0, 0, 0, 0.05);
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Completed Return Button (Green/Success) */
.completed-return-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #28a745;
}

.completed-return-button:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    border-color: #20c997;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Button Icons */
.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

/* Enhanced Loading State - Clean Version */
body .step-body.loading:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 99998;
}

body .step-body.loading:after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border: 6px solid #f0f0f0;
    border-top: 6px solid #0073aa;
    border-radius: 50%;
    z-index: 99999;
    animation: spin 0.8s linear infinite;
    background: transparent;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .lesson-content {
        margin-bottom: 30px;
    }
    
    .completion-status {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .mark-complete-button,
    .completed-return-button {
        width: 100%;
        min-width: auto;
        padding: 16px 24px;
        font-size: 16px;
        gap: 10px;
    }
    
    .ld-lesson-item, 
    .ld-topic-item {
        padding: 12px;
    }
    
    .lesson-title-text, 
    .topic-title-text {
        font-size: 14px;
    }
    
    .lesson-header h2 {
        font-size: 20px;
    }
    
    /* Mobile spinner adjustment */
    body .step-body.loading:after {
        width: 60px !important;
        height: 60px !important;
        margin: -30px 0 0 -30px !important;
        border-width: 4px !important;
    }
}