/* Custom styles for Class Management System */

/* Active navigation item */
.active-nav {
    font-weight: bold;
}

/* Animations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.modal-backdrop.hidden {
    display: none;
}

/* Custom form styles */
.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Table responsive styles */
@media (max-width: 640px) {
    .responsive-table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}

/* Inline editing styles */
.score-cell {
    padding: 0.25rem;
    cursor: default;
    position: relative;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.score-cell.editable {
    cursor: pointer;
    transition: all 0.2s;
}

.score-cell.editable:hover {
    background-color: #f3f4f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.score-cell.editable::after {
    content: '✎';
    position: absolute;
    right: 2px;
    top: 2px;
    font-size: 0.75rem;
    color: #9ca3af;
    opacity: 0;
    transition: opacity 0.2s;
}

.score-cell.editable:hover::after {
    opacity: 1;
}

.score-cell.bg-green-50 {
    background-color: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
    font-weight: 500;
}

/* Status indicators */
.status-present {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #10B981;
    color: white;
    font-size: 0.875rem;
}

.status-absent {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #EF4444;
    color: white;
    font-size: 0.875rem;
}

.status-late {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #F59E0B;
    color: white;
    font-size: 0.875rem;
}

.status-permitted {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #F59E0B;
    color: white;
    font-size: 0.875rem;
}

.status-not-marked {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #9CA3AF;
    color: white;
    font-size: 0.875rem;
}

/* Dashboard card */
.dashboard-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.dashboard-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Button styles */
.btn-primary {
    background-color: #2563EB;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #9ca3af;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #6b7280;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Utility classes */
.text-muted {
    color: #6b7280;
}

.text-success {
    color: #10b981;
}

.text-danger {
    color: #ef4444;
}

.text-warning {
    color: #f59e0b;
}

/* Exam Grade Indicators */
.grade-a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #10B981;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.grade-b-plus {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #3B82F6;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.grade-b {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #6366F1;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.grade-c {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #F59E0B;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.grade-d {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #EF4444;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.grade-e {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #DC2626;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.grade-f {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #6B7280;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Export to PDF styles */
.pdf-container {
    background-color: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media print, (max-width: 500px) {
    /* Make tables more compact for PDF export */
    table th, table td {
        padding: 4px 6px !important;
        font-size: 10px !important;
    }
    
    .grade-a, .grade-b-plus, .grade-b, .grade-c, .grade-d, .grade-e, .grade-f {
        padding: 2px 5px !important;
        font-size: 9px !important;
    }
    
    /* Remove hover effects in PDF */
    .score-cell.editable::after {
        display: none !important;
    }
    
    /* Ensure proper sizing */
    #printable-report {
        width: 100% !important;
        overflow: visible !important;
    }
    
    /* Hide export button when printing */
    #export-pdf-btn {
        display: none !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .status-present,
    .status-late,
    .status-permitted,
    .status-absent,
    .status-not-marked {
        border: 1px solid #000;
        color: #000;
        background-color: transparent;
    }
    
    .status-present::before { content: "✓ "; }
    .status-late::before { content: "⌛ "; }
    .status-permitted::before { content: "⌛ "; }
    .status-absent::before { content: "✗ "; }
    .status-not-marked::before { content: "? "; }
    
    .print-only {
        display: block;
    }
    
    body {
        background-color: white;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    .grade-a,
    .grade-b-plus,
    .grade-b,
    .grade-c,
    .grade-d,
    .grade-e,
    .grade-f {
        border: 1px solid #000;
        color: #000;
        background-color: transparent;
    }
    
    .grade-a::before { content: "A "; }
    .grade-b-plus::before { content: "B+ "; }
    .grade-b::before { content: "B "; }
    .grade-c::before { content: "C "; }
    .grade-d::before { content: "D "; }
    .grade-e::before { content: "E "; }
    .grade-f::before { content: "F "; }
} 