/* =============================================================
   SGT CLASS TABLE  (shared)
   Used by the public Available Classes page (Home/AvailableClasses)
   AND the AddStudent class picker modal so both render the exact
   same class table. Page-chrome (hero, filter bar) stays inline on
   AvailableClasses; everything table-related lives here.
   ============================================================= */

.sgt-classes-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    min-height: 100vh;
}

/* ---------- HERO ---------- */
.sgt-classes-hero {
    text-align: center;
    padding: 60px 20px 30px;
}

.sgt-classes-hero-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 56px;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

/* ---------- AGE KEY AT TOP ---------- */
.sgt-classes-legend-top {
    max-width: 600px;
    margin: 0 auto;
}

    .sgt-classes-legend-top .sgt-classes-legend-items {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }

    .sgt-classes-legend-top .sgt-classes-legend-note {
        font-size: 13px;
        color: #888;
        max-width: 500px;
        margin: 0 auto;
    }

/* ---------- LEVEL FILTER BAR ---------- */
.sgt-classes-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.sgt-classes-filter-link {
    display: inline-block;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    color: #cccccc;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    transition: all 0.25s ease;
}

    .sgt-classes-filter-link:hover {
        color: #ffffff;
        border-color: rgba(255, 0, 255, 0.5);
        box-shadow: 0 0 12px rgba(255, 0, 255, 0.25);
        text-decoration: none;
    }

    .sgt-classes-filter-link.active {
        color: #ffffff;
        background: linear-gradient(90deg, #ff1493, #ff0044);
        border-color: rgba(255, 20, 147, 0.6);
        box-shadow: 0 0 15px rgba(255, 20, 147, 0.4);
    }

/* ---------- GROUP ---------- */
.sgt-classes-group {
    margin-bottom: 50px;
}

.sgt-classes-group-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 0, 255, 0.3);
}

.sgt-classes-group-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: 2px;
}

.sgt-classes-group-desc {
    font-size: 15px;
    color: #aaaaaa;
    margin: 0 0 10px;
}

/* ---------- BADGES ---------- */
.sgt-classes-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
}

.sgt-classes-badge-cyan {
    background: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
    border: 1px solid rgba(0, 217, 255, 0.4);
}

.sgt-classes-badge-red {
    background: rgba(255, 50, 50, 0.2);
    color: #ff4444;
    border: 1px solid rgba(255, 50, 50, 0.4);
    font-size: 12px;
    letter-spacing: 2px;
}

/* ---------- TABLE ---------- */
.sgt-classes-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sgt-classes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .sgt-classes-table thead {
        background: rgba(255, 255, 255, 0.05);
    }

    .sgt-classes-table th {
        padding: 14px 16px;
        text-align: left;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: #888888;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sgt-classes-table td {
        padding: 16px;
        color: #dddddd;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        vertical-align: middle;
    }

    .sgt-classes-table tbody tr:hover {
        background: rgba(255, 0, 255, 0.04);
    }

.sgt-classes-row-full {
    opacity: 0.6;
}

    .sgt-classes-row-full:hover {
        opacity: 0.8;
    }

/* ---------- TABLE CELLS ---------- */
.sgt-classes-td-day {
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.sgt-classes-day-abbr {
    display: none;
}

.sgt-classes-td-time {
    white-space: nowrap;
    color: #00d9ff;
    font-weight: 600;
}

.sgt-classes-td-spots {
    white-space: nowrap;
}

.sgt-classes-spots-frac {
    font-size: 18px;
    font-weight: 900;
    color: #00ff66;
}

/* Co-learning open-spots count: cyan so it reads distinct from the
   green student-seat count sitting right next to it. */
.sgt-classes-colearn-frac {
    color: #00d9ff;
}

.sgt-classes-td-colearn {
    white-space: nowrap;
}

.sgt-classes-colearn-na {
    color: #555;
    font-size: 16px;
}

.sgt-classes-th-age {
    min-width: 200px;
}

/* ---------- AGE CHIPS ---------- */
.sgt-classes-td-ages {
    min-width: 200px;
}

.sgt-classes-age-bars {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sgt-classes-age-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
}

    .sgt-classes-age-chip strong {
        font-size: 13px;
        font-weight: 900;
    }

.sgt-classes-age-youth {
    background: rgba(0, 200, 255, 0.12);
    color: #00c8ff;
    border: 1px solid rgba(0, 200, 255, 0.3);
}

.sgt-classes-age-teen {
    background: rgba(165, 85, 247, 0.12);
    color: #a855f7;
    border: 1px solid rgba(165, 85, 247, 0.3);
}

.sgt-classes-age-adult {
    background: rgba(255, 170, 0, 0.12);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.sgt-classes-age-empty {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* ---------- ACTION BUTTONS ---------- */
.sgt-classes-td-action {
    white-space: nowrap;
    text-align: right;
}

.sgt-classes-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}

.sgt-classes-btn-register {
    background: linear-gradient(90deg, #ff1493, #ff0044);
    color: #ffffff;
    border: 1px solid rgba(255, 20, 147, 0.6);
    box-shadow: 0 0 12px rgba(255, 20, 147, 0.3);
}

    .sgt-classes-btn-register:hover {
        box-shadow: 0 0 20px rgba(255, 20, 147, 0.7);
        transform: translateY(-1px);
        color: #ffffff;
        text-decoration: none;
    }

.sgt-classes-btn-waitlist {
    background: transparent;
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.5);
}

    .sgt-classes-btn-waitlist:hover {
        background: rgba(255, 170, 0, 0.1);
        box-shadow: 0 0 15px rgba(255, 170, 0, 0.3);
        transform: translateY(-1px);
        color: #ffaa00;
        text-decoration: none;
    }

/* Selected state for the picker (AddStudent modal reuses this table). */
.sgt-classes-row-selected {
    background: rgba(130, 0, 255, 0.14) !important;
    box-shadow: inset 0 0 0 2px #8200FF;
}

.sgt-classes-row-waitlisted {
    background: rgba(255, 68, 68, 0.12) !important;
    box-shadow: inset 0 0 0 2px #ff4444;
}

.sgt-classes-btn-selected {
    background: #8200FF;
    color: #fff;
    border-color: #8200FF;
}

/* ---------- EMPTY STATE ---------- */
.sgt-classes-empty {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 15px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

/* =============================================================
   RESPONSIVE - TABLET
   ============================================================= */
@media (max-width: 768px) {
    .sgt-classes-hero {
        padding: 40px 15px 20px;
    }

    .sgt-classes-hero-title {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .sgt-classes-filter-link {
        padding: 8px 16px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .sgt-classes-group-title {
        font-size: 24px;
    }
    /* Swap full day name for abbreviation */
    .sgt-classes-day-full {
        display: none;
    }

    .sgt-classes-day-abbr {
        display: inline;
    }

    .sgt-classes-table {
        font-size: 13px;
    }

        .sgt-classes-table th,
        .sgt-classes-table td {
            padding: 10px 8px;
        }

    .sgt-classes-btn {
        padding: 7px 12px;
        font-size: 11px;
        letter-spacing: 1px;
    }

    .sgt-classes-age-chip {
        font-size: 10px;
        padding: 3px 7px;
    }

    .sgt-classes-th-age,
    .sgt-classes-td-ages {
        min-width: 0;
    }
}

/* =============================================================
   RESPONSIVE - PHONE
   ============================================================= */
@media (max-width: 560px) {
    .sgt-classes-page {
        padding: 0 12px 60px;
    }

    .sgt-classes-filter {
        gap: 8px;
    }

    .sgt-classes-filter-link {
        padding: 7px 14px;
        font-size: 11px;
    }

    .sgt-classes-table {
        font-size: 12px;
    }

        .sgt-classes-table th,
        .sgt-classes-table td {
            padding: 9px 6px;
        }

    .sgt-classes-btn {
        padding: 6px 10px;
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .sgt-classes-age-bars {
        flex-direction: column;
        gap: 4px;
    }

    .sgt-classes-age-chip {
        font-size: 10px;
        padding: 3px 6px;
    }
}
