/* * Final Stylesheet for Exam Schedule Plugin 
 * Version: 3.6.0
 * Author: Saberi
 * Description: Responsive styles for full-width exam schedule plugin
 */

/* --- بخش اصلاح شده برای فونت --- */
/* 1. بارگذاری فونت وزیرمتن از اینترنت برای همه دستگاه‌ها */
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
/* --- پایان بخش اصلاح شده --- */

/* Main Container Styles */
.exam-box {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(to right, #f1f5f9, #e2e8f0);
    box-sizing: border-box;
    direction: rtl;
    /* 2. استفاده از فونت جدید بارگذاری شده */
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    border-radius: 0;
    box-shadow: none;
}

/* Header Styles */
.exam-box h2 {
    text-align: center;
    margin: 0 0 30px 0;
    padding: 0;
    font-size: 28px;
    font-weight: 700;
    color: #2563eb;
    position: relative;
}

.exam-box h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: #2563eb;
    margin: 15px auto 0;
    border-radius: 3px;
}

/* Form Controls */
.exam-box .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.exam-box .select-group {
    flex: 1;
    min-width: 250px;
}

.exam-box .select-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
    font-size: 15px;
}

.exam-box select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-family: inherit;
    font-size: 15px;
    background-color: white;
    color: #334155;
    transition: border-color 0.3s;
    cursor: pointer;
}

.exam-box select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Action Buttons */
.exam-box .action-buttons {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.exam-box .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.exam-box .download-btn {
    background-color: #10b981;
    color: white;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.2);
}

.exam-box .download-btn:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.exam-box .btn:disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Grades Container */
.exam-box .grades-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Grade Card Styles */
.exam-box .grade-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.exam-box .grade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.exam-box .grade-header {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    padding: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    position: relative;
}

.exam-box .grade-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
}

/* Table Styles */
.exam-box .grade-table {
    width: 100%;
    border-collapse: collapse;
    flex-grow: 1;
}

.exam-box .grade-table th, 
.exam-box .grade-table td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    font-size: 16px;
}

.exam-box .grade-table th {
    background-color: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

.exam-box .grade-table tr:last-child td {
    border-bottom: none;
}

.exam-box .grade-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.exam-box .grade-table tr:hover {
    background-color: #f1f5f9;
}

.exam-box .grade-table td:nth-child(3) { /* ستون نام درس */
    font-weight: 600;
    color: #1e40af;
}

.exam-box .grade-table td {
    color: #334155;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .exam-box .grades-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .exam-box { padding: 20px 15px; }
    .exam-box h2 { font-size: 24px; margin-bottom: 20px; }
    .exam-box .controls { flex-direction: column; gap: 15px; }
    .exam-box .select-group { min-width: 100%; }
    .exam-box .action-buttons { width: 100%; justify-content: center; margin-top: 10px; }
    .exam-box .grades-container { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .exam-box .grade-table th, 
    .exam-box .grade-table td {
        padding: 12px 8px;
        font-size: 15px;
    }
    .exam-box .grade-header { font-size: 16px; padding: 12px; }
    .exam-box .btn { padding: 10px 18px; font-size: 14px; }
}