/* CSS for transcript page - RTL Support */

/* Dropdown arrows on the left for RTL */
.form-select {
    background-position: left 0.75rem center !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-size: 16px 12px !important;
    padding-right: 0.75rem !important;
    padding-left: 2rem !important;
    text-align: right;
}

/* For select elements with RTL text */
select.form-select {
    direction: rtl;
}

select.form-select option {
    direction: rtl;
    text-align: right;
}

/* Grade display styling */
.grade-display {
    font-weight: 500;
}

.grade-with-history {
    cursor: help;
    border-bottom: 1px dotted #999;
}

.grade-history-tooltip {
    font-size: 11px;
    color: #666;
}

/* Custom grade display cell */
.grade-cell {
    font-family: monospace;
    font-weight: bold;
    direction: ltr;
    text-align: center;
}

/* F grade highlighting */
.f-grade-highlight {
    background-color: #ffebee !important;
    color: #c62828 !important;
    font-weight: bold !important;
}

/* Student status styling */
.student-status {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.status-graduated {
    background-color: #4caf50;
    color: white;
}

.status-suspended {
    background-color: #ff9800;
    color: white;
}

.status-failed {
    background-color: #f44336;
    color: white;
}

.status-transfer {
    background-color: #2196f3;
    color: white;
}

.status-in-study {
    background-color: #9c27b0;
    color: white;
}

/* Button styling */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.filter-controls {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}

/* Transcript card styling */
.transcript-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.university-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.university-name {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.college-name {
    font-size: 18px;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 5px;
}

.dept-name {
    font-size: 14px;
    color: #7f8c8d;
}

.filter-info {
    background: #ecf0f1;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #2c3e50;
}

.table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px;
    border-radius: 8px 8px 0 0;
    margin-top: 20px;
    font-weight: bold;
}

.scroll-wrapper {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.report-table th {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    font-weight: bold;
}

.report-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: center;
}

.report-table td.text-right {
    text-align: right;
}

.summary-footer {
    margin-top: 20px;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.grade-legend {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 11px;
    direction: rtl;
}

/* Action buttons */
.action-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.btn-floating {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Loading indicator */
.spinner-border {
    width: 40px;
    height: 40px;
}

.pdf-loading-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 9999;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .transcript-card {
        box-shadow: none;
        padding: 0;
    }
    
    .report-table th, .report-table td {
        border: 1px solid #000 !important;
    }
}