/* student.css - Student Portal Styles */

.container {
    display: flex;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #eaeaea;
    padding: 2rem;
    position: fixed;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.profile-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--radius);
}

.profile-info p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    color: var(--gray);
}

.stat-value {
    font-weight: bold;
    color: var(--primary);
}

.sidebar-btn {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.sidebar-btn:hover {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: #f8f9fa;
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.welcome-section h1 {
    margin-bottom: 0.5rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-card.large {
    grid-column: span 2;
}

.card-header {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Note Generator */
.note-generator {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.note-generator select,
.note-generator input {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
}

.language-toggle {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    flex: 1;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-generate {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.notes-preview {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--radius);
    min-height: 200px;
    border: 2px dashed #ddd;
}

/* AI Chat Mini */
.ai-chat-mini {
    display: flex;
    flex-direction: column;
    height: 300px;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.message {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border-radius: var(--radius);
}

.message.ai {
    background: #e3f2fd;
    margin-right: 20%;
}

.message.user {
    background: var(--primary);
    color: white;
    margin-left: 20%;
}

.ai-input {
    display: flex;
    gap: 0.5rem;
}

.ai-input input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: var(--radius);
}

.ai-input button {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    border-radius: var(--radius);
    cursor: pointer;
}

.quick-questions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Video List */
.video-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.video-item img {
    width: 100px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.video-info {
    flex: 1;
}

.btn-watch {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Tutor List */
.tutor-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
    align-items: center;
}

.tutor-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.btn-book {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Progress Chart */
.progress-chart {
    margin-bottom: 1rem;
}

.progress-bar {
    height: 10px;
    background: #eaeaea;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray);
}

.progress-details {
    margin-top: 1rem;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Session List */
.session-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.session-time {
    text-align: center;
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    min-width: 80px;
}

.time {
    display: block;
    font-weight: bold;
    color: var(--primary);
}

.hour {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
}

.btn-join {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 0.8rem;
    text-align: left;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Add to student.css */
.notes-content {
    white-space: pre-line;
    line-height: 1.6;
    margin-top: 1rem;
}

.bilingual-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.english-section, .urdu-section {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.urdu-section {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Nastaliq Urdu', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@font-face {
    font-family: 'Noto Nastaliq Urdu';
    src: url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu&display=swap');
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}