/*
 * Student Portal CSS
 * Specific styles for student/grades.php and student/schedule.php
 */

/* Card styling */
.card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.card-header {
    padding: 15px 20px;
}

.card-header h3 {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.card-body {
    padding: 20px;
}

/* Form styling */
.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    border-radius: 6px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 113, 188, 0.25);
    border-color: #0071bc;
}

.form-select {
    border-radius: 6px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
}

.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 113, 188, 0.25);
    border-color: #0071bc;
}

/* Button styling */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0071bc;
    border-color: #0071bc;
}

.btn-primary:hover {
    background-color: #005a95;
    border-color: #005a95;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #146c43;
    border-color: #146c43;
}

.btn-light {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: #212529;
}

.btn-light:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

/* Table styling */
.table {
    margin-bottom: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-primary {
    background-color: #0071bc;
    color: white;
}

.table-primary th {
    background-color: #0071bc;
    color: white;
    border-color: #005a95;
}

/* Alert styling */
.alert {
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-info {
    background-color: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

/* Student information styling */
.card-header.bg-info {
    background-color: #0dcaf0 !important;
}

.card-header.bg-primary {
    background-color: #0071bc !important;
}

.card-header.bg-success {
    background-color: #198754 !important;
}

/* Print button styling */
.btn i {
    margin-right: 5px;
}

/* Context-specific stat card styling */
/* Dashboard stat cards - dark text on white backgrounds */
#dashboard-section .stat-card {
    background: white;
    color: #343a40;
}

#dashboard-section .stat-card .stat-content h3,
#dashboard-section .stat-card .stat-number {
    color: #343a40 !important;
}

#dashboard-section .stat-card .stat-label,
#dashboard-section .stat-card p {
    color: #6c757d !important;
}

/* Grades page stat cards - white text on colored backgrounds */
.stat-card.bg-primary,
.stat-card.bg-success,
.stat-card.bg-warning,
.stat-card.bg-info,
.stat-card.bg-danger {
    color: white !important;
}

.stat-card.bg-primary *,
.stat-card.bg-success *,
.stat-card.bg-warning *,
.stat-card.bg-info *,
.stat-card.bg-danger * {
    color: white !important;
}

/* Text-white class support */
.stat-card.text-white,
.stat-card.text-white * {
    color: white !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-header h3 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 8px 16px;
    }

    .table {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .card-header h3 {
        font-size: 1.2rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table th, .table td {
        padding: 0.5rem;
    }
}

/* Print styles */
@media print {
    .btn, .form-select, .form-control, .col-md-2 {
        display: none !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .card-header {
        background-color: #f8f9fa !important;
        color: #212529 !important;
    }

    .card-header h3 {
        color: #212529 !important;
    }

    .table th {
        background-color: #f8f9fa !important;
        color: #212529 !important;
    }
}

/* Direct color overrides for cPanel compatibility */
.bg-primary {
    background-color: #0071bc !important;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-info {
    background-color: #0dcaf0 !important;
}

.text-white {
    color: white !important;
}

.btn-primary {
    background-color: #0071bc !important;
    border-color: #0071bc !important;
}

.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.table-primary {
    --bs-table-bg: #0071bc !important;
    --bs-table-color: #fff !important;
}

/* Fix for dropdown menus in the header */
.dropdown-menu {
    position: absolute !important;
    z-index: 1000 !important;
    display: none !important;
    min-width: 10rem !important;
    padding: 0.5rem 0 !important;
    margin: 0 !important;
    font-size: 1rem !important;
    color: #212529 !important;
    text-align: left !important;
    list-style: none !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.25rem !important;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    display: block !important;
    width: 100% !important;
    padding: 0.25rem 1rem !important;
    clear: both !important;
    font-weight: 400 !important;
    color: #212529 !important;
    text-align: inherit !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    background-color: transparent !important;
    border: 0 !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    color: #1e2125 !important;
    background-color: #f8f9fa !important;
}

.dropdown-item.active, .dropdown-item:active {
    color: #fff !important;
    text-decoration: none !important;
    background-color: #0071bc !important;
}
