/* LMS Module Styles */

/* Course Card Hover Effect */
.lms-course-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lms-course-card:hover {
    transform: translateY(-2px);
}

/* Video Container */
.lms-video-container {
    background-color: transparent;
}

.lms-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

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

.lms-video-iframe {
    border: none;
}

/* Progress bar animation */
.lms-progress-bar {
    transition: width 0.3s ease;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prose styles for rendered markdown content */
.prose h1 { font-size: 1.5rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose h2 { font-size: 1.25rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.prose h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.5rem; }
.prose p { margin-top: 0.5rem; margin-bottom: 0.5rem; line-height: 1.625; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin: 0.5rem 0; }
.prose ol { list-style: decimal; padding-left: 1.5rem; margin: 0.5rem 0; }
.prose li { margin: 0.25rem 0; }
.prose code { background: #f3f4f6; padding: 0.125rem 0.25rem; border-radius: 0.25rem; font-size: 0.875rem; }
.prose pre { background: #1f2937; color: #e5e7eb; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; margin: 1rem 0; }
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose blockquote { border-left: 4px solid #6366f1; padding-left: 1rem; margin: 1rem 0; color: #4b5563; }
.prose a { color: #4f46e5; text-decoration: underline; }
.prose img { max-width: 100%; border-radius: 0.5rem; margin: 1rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: #f9fafb; font-weight: 600; }

/* Quill editor overrides for LMS */
#quill-editor .ql-editor {
    min-height: 300px;
    font-size: 0.875rem;
    line-height: 1.625;
}

/* Sidebar active lecture highlight */
.lms-sidebar-active {
    background-color: #eef2ff;
    border-left: 3px solid #6366f1;
    font-weight: 600;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translate(-50%, -40%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.lms-resources-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.lms-resources-pill:hover {
    background-color: #4f46e5;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Modal Overlay */
.lms-resource-modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    animation: modalFadeIn 0.2s ease-out;
}

.lms-resource-modal-overlay.show {
    display: flex;
}

/* Modal Container */
.lms-resource-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 32rem; /* 512px */
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 101;
    display: none;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lms-resource-modal.show {
    display: block;
}

.lms-resource-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(249, 250, 251, 0.5);
}

.lms-resource-modal-body {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.lms-resource-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.2s;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.lms-resource-item:last-child {
    margin-bottom: 0;
}

.lms-resource-item:hover {
    background-color: #eef2ff;
    color: #4338ca;
    border-color: #e0e7ff;
}

.lms-resource-icon {
    height: 1.5rem;
    width: 1.5rem;
    margin-right: 1rem;
    color: #818cf8;
    transition: transform 0.2s;
}

.lms-resource-item:hover .lms-resource-icon {
    transform: scale(1.1);
}
