/* ============================================
   Training Portal - Custom Styles
   ============================================ */

/* Base */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand i {
    margin-right: 0.25rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Course Cards */
.course-card {
    cursor: pointer;
    transition: transform 0.15s ease;
}

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

/* Progress Bars */
.progress {
    height: 1.25rem;
    border-radius: 0.5rem;
}

.progress-bar {
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Badge Styles */
.badge-standard {
    background-color: #0d6efd;
}

.badge-onsite {
    background-color: #198754;
}

.badge-live {
    background-color: #6f42c1;
}

/* Video Player */
.video-container {
    position: relative;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    max-height: 70vh;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.5rem;
    z-index: 10;
    pointer-events: none;
}

.video-overlay.hidden {
    display: none;
}

/* Custom Controls */
.video-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.video-controls .btn {
    color: #fff;
    border: none;
    padding: 0.25rem 0.5rem;
}

.video-controls .progress {
    flex: 1;
    height: 0.5rem;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.3);
}

.video-controls .progress-bar {
    background-color: #0d6efd;
}

.video-controls .time-display {
    font-size: 0.8rem;
    min-width: 6rem;
    text-align: center;
}

/* Exam */
.exam-timer {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
}

.exam-timer.warning {
    border-bottom-color: #ffc107;
    background: #fff3cd;
}

.exam-timer.danger {
    border-bottom-color: #dc3545;
    background: #f8d7da;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.question-card {
    border-left: 4px solid #0d6efd;
    margin-bottom: 1.5rem;
}

.question-card .card-header {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Dashboard Stats */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0d6efd;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Admin Tables */
.table-admin th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.table-admin td {
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Attendance Flags */
.attendance-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.attendance-flag.standard {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.attendance-flag.on-site {
    background-color: #d1e7dd;
    color: #198754;
}

.attendance-flag.live-online {
    background-color: #e8d5f5;
    color: #6f42c1;
}

/* Merge Modal */
.merge-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.merge-preview .merge-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.merge-preview .merge-item:last-child {
    border-bottom: none;
}

/* FAQ */
.faq-item {
    border-left: 3px solid #0d6efd;
    margin-bottom: 1rem;
}

.faq-item .card-header {
    cursor: pointer;
    background-color: #fff;
}

.faq-item .card-header:hover {
    background-color: #f8f9fa;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-number {
        font-size: 1.75rem;
    }

    .table-responsive {
        font-size: 0.8rem;
    }
}
