/* GBN LMS Public Styles */

/* Lesson View Styles */
.gbn-lms-lesson-container {
    max-width: 1200px;
    margin: 120px auto 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gbn-lms-lesson-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
}

.gbn-lms-lesson-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
}

.gbn-lms-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e5e5;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.gbn-lms-progress-fill {
    height: 100%;
    background-color: #007cba;
    width: 0%;
    transition: width 0.3s ease;
}

.gbn-lms-progress-fill.completed {
    width: 100%;
    background-color: #28a745;
}

.gbn-lms-lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.gbn-lms-date-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.gbn-lms-date-item {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.gbn-lms-date-item.completed {
    background-color: #d4edda;
    color: #155724;
}

.gbn-lms-lesson-content > div {
    margin-bottom: 40px;
}

.gbn-lms-video-section h2,
.gbn-lms-lesson-description h2,
.gbn-lms-quiz-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.gbn-lms-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.gbn-lms-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gbn-lms-content {
    line-height: 1.6;
    font-size: 1.1rem;
    color: #555;
}

.gbn-lms-quiz-container {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.gbn-lms-quiz-question {
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.question-title {
    font-size: 1.2rem;
    color: #007cba;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 500;
}

.gbn-lms-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background-color: #e9ecef;
    border-color: #007cba;
}

.quiz-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.quiz-option input[type="radio"]:checked + .option-text {
    font-weight: 600;
    color: #007cba;
}

.gbn-lms-quiz-actions {
    margin-top: 30px;
    text-align: center;
}

.gbn-lms-submit-btn, .gbn-lms-reset-btn {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0 10px;
}

.gbn-lms-submit-btn:hover, .gbn-lms-reset-btn:hover {
    background-color: #005a87;
}

.gbn-lms-reset-btn {
    background-color: #6c757d;
}

.gbn-lms-reset-btn:hover {
    background-color: #545b62;
}

.gbn-lms-quiz-feedback {
    margin-top: 20px;
    padding: 20px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
}

.gbn-lms-quiz-feedback.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gbn-lms-quiz-feedback.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gbn-lms-no-quiz {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Back to Dashboard Link */
.gbn-lms-nav-links {
    margin-bottom: 20px;
}

.gbn-lms-back-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: #007cba;
    background-color: #f0f8ff;
    border: 1px solid #bee1fa;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gbn-lms-back-link:hover {
    background-color: #d8eefe;
    color: #005a87;
}

.gbn-lms-back-link .dashicons {
    margin-right: 4px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Certificate Styles */
.gbn-lms-certificate-section {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    background-color: #f9f9e3;
    border: 2px dashed #d4c96e;
    border-radius: 8px;
}

/* Certificate styles for already completed lessons */
.gbn-lms-lesson-completed-section {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.gbn-lms-completed-message {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.gbn-lms-certificate-section h3 {
    color: #8a741a;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.gbn-lms-certificate-btn {
    margin-top: 15px;
    background-color: #eeba30;
    color: #333;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.gbn-lms-certificate-btn:hover {
    background-color: #d9a520;
}

.gbn-lms-certificate-btn .dashicons {
    margin-right: 8px;
}

/* Certificate button spinner */
.gbn-lms-spin {
    animation: gbn-lms-spin 2s infinite linear;
    display: inline-block;
    margin-right: 5px;
}

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

@media (max-width: 768px) {
    .gbn-lms-lesson-container {
        padding: 15px;
    }
    
    .gbn-lms-lesson-title {
        font-size: 2rem;
    }
    
    .gbn-lms-date-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .gbn-lms-quiz-container {
        padding: 20px;
    }
    
    .gbn-lms-quiz-question {
        padding: 15px;
    }
}