/* ==============================================================
   CUSTOM CSS TAMBAHAN (Modul E-Learning, Timeline, Summernote)
   ============================================================== */

/* --- 1. UX & Utilitas --- */
.cursor-pointer { cursor: pointer; }
.sort.asc::after { content: " \f0de"; font-family: "bootstrap-icons"; }
.sort.desc::after { content: " \f0dd"; font-family: "bootstrap-icons"; }
#searchPanel { transition: all 0.3s ease-in-out; }
.fs-7 { font-size: 0.85rem; }
.small, small { font-size: .975em; }
.text-small { font-size: 0.85rem; }
.footer { flex-shrink: 0; width: 100%; }

/* --- 2. Avatar & Profil --- */
.avatar-img {
    width: 40px; height: 40px; object-fit: cover;
    border-radius: 50%; border: 2px solid white; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.avatar-group { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 10px; }
.avatar-group .avatar-img { width: 50px; height: 50px; margin-left: -15px; }
.avatar-group .avatar-img:first-child { margin-left: 0; }

.lecturer-avatars { display: flex; align-items: center; }
.lecturer-img {
    width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff;
    object-fit: cover; margin-right: -10px; transition: margin 0.2s;
}
.lecturer-img:hover { margin-right: 5px; z-index: 10; }
.img-lecturer { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.lecturer-names { font-size: 0.85rem; color: #555; margin-left: 15px; font-style: italic; }

.img-student { width: 70px; height: 70px; object-fit: cover; border-radius: 50%; border: 3px solid #dee2e6; }
.student-header { background-color: #223842; color: white; padding: 5px 10px; font-size: 0.9rem; border-radius: 4px 4px 0 0; }

/* --- 3. Layout & Container (Timeline & Filter) --- */
.participant-container { overflow-y: auto; }
.filter-section {
    background-color: #ffffff;
    border-bottom: 3px solid var(--theme-primary); /* Dinamis Tema */
    padding: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 1000; position: relative;
}
#timeline-container {
    height: calc(100vh - 140px); overflow-y: auto; padding: 20px; scroll-behavior: smooth;
}

/* --- 4. Cards & Komponen Spesifik --- */
.course-card {
    border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; background: white;
    transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.course-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--theme-primary); /* Dinamis Tema */
}

.exam-card {
    border: none;
    border-left: 5px solid var(--theme-primary) !important; /* Dinamis Tema */
    background-color: var(--theme-light) !important; /* Latar tipis mengikuti tema */
    margin-bottom: 20px; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.exam-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

.card-header-custom {
    color: var(--theme-primary); /* Dinamis Tema */
    font-weight: bold; font-size: 1.1rem; border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 8px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
}

/* --- 5. Tipografi, Warna & Loading --- */
.course-title { font-weight: 700; color: #212529; text-transform: uppercase; }
.blue-link { color: var(--theme-primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.text-teal { color: var(--theme-primary) !important; }
.bg-custom-dark { background-color: var(--theme-primary-dark) !important; color: white; }
.border-left-accent { border-left: 4px solid var(--theme-primary) !important; }
.badge-exam-type { background-color: var(--theme-primary) !important; color: var(--theme-text-on-primary) !important; }

.meta-label { font-weight: 600; color: #495057; font-size: 0.9rem; }
.meta-value { font-size: 0.9rem; color: #212529; }
.stat-item { text-align: center; font-size: 0.8rem; color: #495057; margin-bottom: 10px; }
.stat-icon { font-size: 1.2rem; margin-bottom: 5px; display: block; }
.stat-item i { color: #343a40; }

.loading-trigger { height: 50px; text-align: center; padding: 10px; opacity: 0; }
.loading-indicator, .loader { text-align: center; padding: 20px; display: none; color: var(--theme-primary); }

/* --- 6. Form Toolbar & File Input --- */
.btn-toolbar-custom { background-color: #f8f9fa; border: 1px solid #ced4da; color: #495057; font-size: 0.85rem; }
.btn-toolbar-custom:hover { background-color: #e2e6ea; }
.btn-file { position: relative; overflow: hidden; }
.btn-file input[type=file] {
    position: absolute; top: 0; right: 0; min-width: 100%; min-height: 100%;
    font-size: 100px; text-align: right; filter: alpha(opacity=0); opacity: 0;
    outline: none; background: white; cursor: inherit; display: block;
}

/* --- 7. Editor Summernote (Z-Index Fix & Media) --- */
.note-editor .dropdown-menu { z-index: 10050 !important; }
.note-modal-backdrop { z-index: 10040 !important; }
.note-modal { z-index: 10050 !important; }
.dropdown-menu { z-index: 1050 !important; }

.editor-container { min-height: 300px; max-height: 600px; overflow-y: auto; outline: none; }
.editor-container:focus { background-color: #fcfcfc; }
.editor-container img { max-width: 100%; height: auto; margin: 10px 0; border: 1px solid transparent; cursor: pointer; transition: all 0.2s; }
.editor-container img:hover { border: 1px dashed var(--theme-primary); opacity: 0.9; }
.editor-image-selected { outline: 3px solid var(--theme-primary); box-shadow: 0 0 10px var(--theme-light); }
.editor-container video { max-width: 100%; margin: 10px 0; background: #000; }
.editor-container audio { width: 100%; margin: 10px 0; }
.editor-container iframe { max-width: 100%; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; }

/* --- 8. Link Guide & Embed Cards --- */
.link-guide-container, .link-guide-wrapper {
    max-height: 250px; overflow-y: auto; background-color: #f8f9fa;
    border: 1px solid #e9ecef; border-radius: 5px; padding: 10px; margin-top: 10px; font-size: 0.85rem;
}
.link-guide-item { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed #ddd; }
.link-guide-item:last-child { border-bottom: none; }
.link-guide-label, .link-guide-title { font-weight: bold; display: block; color: #555; margin-bottom: 2px; }
.link-guide-example, .link-guide-code {
    font-family: monospace; color: var(--theme-primary); background: #fff;
    padding: 2px 5px; border-radius: 3px; border: 1px solid #e9ecef; word-break: break-all; display: block; margin-top: 2px;
}

.embed-card {
    border: 1px solid #e0e0e0; border-radius: 8px; padding: 12px; margin: 10px 0;
    background: #fff; display: flex; align-items: center; text-decoration: none; color: #333;
    transition: box-shadow 0.2s; max-width: 600px;
}
.embed-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.1); text-decoration: none; color: var(--theme-primary-dark); }
.embed-icon { font-size: 24px; margin-right: 12px; width: 40px; text-align: center; }
.embed-info { display: flex; flex-direction: column; overflow: hidden; }
.embed-title { font-weight: bold; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embed-link { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }