/**
 * Frontend Stylesheet for ProSchool Portal Plugin
 *
 * This file contains all custom styles for the student portal view on the
 * frontend of the WordPress site (accessed via shortcodes).
 *
 * @package    ProSchool_Portal
 * @subpackage ProSchool_Portal/assets/css
 * @author     Mr. Micheal (MbilleTech) <mbilletech64@gmail.com>
 */

/* Define a professional color palette and smooth transitions */
:root {
    --proschool-blue-primary: #0056b3; /* Deep Professional Blue */
    --proschool-blue-light: #e6f0fa;  /* Very light background */
    --proschool-text-dark: #2c3e50;   /* Dark Text for readability */
    --proschool-text-medium: #555;
    --proschool-success: #28a745;
    --proschool-border-color: #e0e0e0;
}

/* ==============================================
   1. Base Container and Typography
   ============================================== */
.proschool-student-portal {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 1100px; /* Slightly wider */
    margin: 30px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    /* Elevated professional shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--proschool-border-color);
}

.proschool-student-portal h2 {
    color: var(--proschool-blue-primary);
    border-bottom: 3px solid var(--proschool-blue-light);
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1.2;
}

.proschool-student-portal p {
    line-height: 1.7;
    color: var(--proschool-text-medium);
}

/* ==============================================
   2. Tabbed Navigation (Dashboard)
   ============================================== */
.proschool-tabs-nav {
    display: flex;
    margin-bottom: 0; /* Tabs should sit directly on the border */
    border-bottom: 2px solid var(--proschool-border-color);
    overflow-x: auto;
    white-space: nowrap;
}

.proschool-tab-link {
    padding: 12px 25px;
    cursor: pointer;
    background-color: #f8f9fa; /* Light grey background for inactive tabs */
    margin-right: 2px;
    border: 1px solid transparent;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    color: var(--proschool-text-medium);
    font-weight: 600;
    transition: all 0.3s ease-in-out;
    position: relative;
    top: 1px; /* Align perfectly with the border */
}

.proschool-tab-link:hover {
    background-color: #ececec;
    color: var(--proschool-text-dark);
}

.proschool-tab-link.active {
    background-color: #ffffff;
    border-color: var(--proschool-border-color);
    border-bottom: 2px solid #ffffff; /* Create "lifted" effect */
    color: var(--proschool-blue-primary);
    font-weight: 700;
}

.proschool-tab-content {
    padding-top: 25px;
}

/* ==============================================
   3. Student Profile/Info Card
   ============================================== */
.proschool-profile-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background: var(--proschool-blue-light); /* Highlight with light blue */
    border: 1px solid var(--proschool-blue-primary);
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 86, 179, 0.1); /* Subtle blue shadow */
}

.proschool-profile-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--proschool-blue-primary);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.7); /* White ring effect */
}

.proschool-profile-info {
    flex-grow: 1;
}

.proschool-profile-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.8em;
    color: var(--proschool-text-dark);
    font-weight: 700;
}

.proschool-profile-info p {
    margin: 0;
    font-size: 1.0em;
    color: var(--proschool-text-medium);
    display: block; /* Ensure each detail is on its own line */
}

/* ==============================================
   4. Data Tables (Marks/Results)
   ============================================== */
.proschool-data-table-container {
    overflow-x: auto;
    margin-top: 25px;
    border: 1px solid var(--proschool-border-color);
    border-radius: 8px;
}

.proschool-data-table {
    width: 100%;
    border-collapse: collapse;
    /* Remove outer table border as container handles it */
}

.proschool-data-table th,
.proschool-data-table td {
    border: none; /* Let the main container manage borders */
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.95em;
}

.proschool-data-table th {
    background-color: var(--proschool-blue-light);
    font-weight: 700;
    color: var(--proschool-blue-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--proschool-border-color);
}

.proschool-data-table tbody tr:last-child td {
    border-bottom: none;
}

.proschool-data-table tbody tr:hover {
    background-color: #f7f9fc; /* Very light hover background */
    cursor: default;
}

/* Highlighting specific columns */
.proschool-data-table .col-mark,
.proschool-data-table .col-grade,
.proschool-data-table .col-rank {
    text-align: center;
    font-weight: 700;
    color: var(--proschool-text-dark);
    font-size: 1.1em;
}
.proschool-data-table .col-grade {
    font-size: 1.0em;
}

.proschool-data-table .grade-pass {
    color: var(--proschool-success);
}
.proschool-data-table .grade-fail {
    color: #dc3545; /* Standard Red for failure */
}

/* ==============================================
   5. Action Buttons and Downloads
   ============================================== */
.proschool-actions-container {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid var(--proschool-border-color);
    border-radius: 8px;
    background-color: #fcfcfc;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.proschool-action-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    border: none;
    border-radius: 30px; /* Pill-shaped buttons */
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.proschool-action-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.proschool-action-button.report {
    background-color: var(--proschool-blue-primary);
    color: #ffffff;
}

.proschool-action-button.report:hover {
    background-color: #004494; /* Slightly darker blue */
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.3);
}

.proschool-action-button.certificate {
    background-color: var(--proschool-success);
    color: #ffffff;
}

.proschool-action-button.certificate:hover {
    background-color: #1f913d; /* Slightly darker green */
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

.proschool-action-button i {
    margin-right: 10px;
    font-size: 1.2em;
}

/* ==============================================
   6. General Messages and Alerts
   ============================================== */
.proschool-message.info {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    background-color: #f0f8ff; /* Lightest Blue */
    border: 1px solid #a8c1e4;
    color: #004c8c;
    font-weight: 500;
}
.proschool-message.info strong {
    color: var(--proschool-blue-primary);
}


/* ==============================================
   7. Responsiveness (Mobile Optimization)
   ============================================== */
@media (max-width: 768px) {
    .proschool-student-portal {
        padding: 20px 15px;
        margin: 15px auto;
        border-radius: 0; /* Full width on smallest screens */
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .proschool-student-portal h2 {
        font-size: 1.6em;
    }

    .proschool-profile-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }

    .proschool-profile-card img {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .proschool-profile-info h3 {
        font-size: 1.4em;
    }

    .proschool-actions-container {
        flex-direction: column;
        gap: 10px;
    }

    .proschool-action-button {
        width: 100%; /* Full width buttons on mobile */
        justify-content: center;
    }

    .proschool-tabs-nav {
        /* Keep existing horizontal scrolling functionality */
    }

    /* Ensure table content is legible by scrolling horizontally */
    .proschool-data-table-container {
        border: none;
    }
    .proschool-data-table {
        min-width: 650px; /* Minimum width for horizontal scroll */
    }
}