/* ===== Attesta.uz — Legacy compatibility layer ===== */
/* design.css + tokens.css are the primary style source.  */
/* This file only keeps utilities needed by older pages.   */

/* ===== Video Player ===== */
.video-container {
    position: relative;
    padding: 10px;;
    padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.video-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
    margin: 10px;
    padding: 10px;
}

/* ===== Progress (Bootstrap override) ===== */
.progress-custom { height: 8px; border-radius: 4px; background: var(--surface-3); }
.progress-custom .progress-bar {
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-hex), #5ecf97);
}

/* ===== Admin Sidebar (keeps admin pages working) ===== */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: var(--ink);
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.65);
    padding: 10px 16px;
    border-radius: var(--r-sm);
    margin: 2px 8px;
    transition: background 0.15s, color 0.15s;
    font-size: 14px;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* ===== Old teacher-wrapper (legacy pages) ===== */
.teacher-wrapper { display: flex; min-height: 100vh; }
.teacher-content { flex: 1; padding: 24px; overflow-x: auto; background: var(--bg); }

/* ===== Topic list ===== */
.topic-list .list-group-item {
    border: none; border-left: 3px solid transparent;
    transition: background 0.15s;
}
.topic-list .list-group-item:hover { background: var(--surface-2); }
.topic-list .list-group-item.active {
    background: var(--accent-soft); border-left-color: var(--accent-hex); color: var(--accent-ink);
}
.topic-list .list-group-item.completed { border-left-color: var(--accent-hex); }

/* ===== Comments ===== */
.comment-card {
    border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 16px; margin-bottom: 12px; background: var(--surface);
}
.comment-reply { margin-left: 40px; border-left: 2px solid var(--accent-hex); padding-left: 16px; }

/* ===== Table ===== */
.table-custom { border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-custom thead { background: var(--ink); color: white; }

/* ===== Chat ===== */
.chat-container {
    display: flex; flex-direction: column; height: 70vh;
    background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; }
.chat-message {
    max-width: 70%; padding: 10px 14px; border-radius: 12px;
    margin-bottom: 8px; font-size: 14px;
}
.chat-message.sent {
    margin-left: auto; background: var(--accent); color: white;
    border-bottom-right-radius: 4px;
}
.chat-message.received {
    background: var(--surface-2);
    border-bottom-left-radius: 4px;
}
.chat-input {
    display: flex; gap: 10px; padding: 16px;
    border-top: 1px solid var(--line);
}

/* ===== AI Assistant ===== */
.ai-chat-container {
    background: linear-gradient(135deg, var(--surface-2), var(--accent-soft));
    border-radius: var(--r-md);
    min-height: 60vh;
}

/* ===== Hover lift ===== */
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ===== Badge level ===== */
.badge-level { font-size: 11px; padding: 3px 8px; border-radius: var(--r-pill); }

/* ===== Dashboard stat (old pages) ===== */
.dashboard-stat {
    background: var(--surface); border-radius: var(--r-md); padding: 20px;
    box-shadow: var(--shadow-sm); border-left: 4px solid var(--accent-hex);
}
.dashboard-stat .stat-value { font-size: 2rem; font-weight: 700; color: var(--ink); font-family: var(--font-head); }
.dashboard-stat .stat-label { color: var(--muted); font-size: 13px; }
.dashboard-stat .stat-icon { font-size: 2rem; color: var(--accent-hex); opacity: 0.3; }

/* ===== Bootstrap primary color: map to accent ===== */
.btn-primary { background-color: var(--accent-hex) !important; border-color: var(--accent-hex) !important; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline-primary { color: var(--accent-ink) !important; border-color: var(--accent-hex) !important; }
.btn-outline-primary:hover { background-color: var(--accent-hex) !important; color: white !important; }
.text-primary { color: var(--accent-hex) !important; }
.bg-primary { background-color: var(--accent-hex) !important; }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .chat-message { max-width: 85%; }
}
