/* ===================================================
   GS Directory — GSU Branded Styles (Aerie Design System)
   =================================================== */

/* Georgia Southern Color Palette — matches Aerie */
:root {
    --gsu-navy: #001344;
    --gsu-blue: #005d90;
    --gsu-gold: #a99260;
    --gsu-gold-bright: #f9c234;
    --gsu-gold-dark: #b9832d;
    --gsu-light-gray: #f7f7f7;
    --gsu-gray: #a5acaf;
}

/* ---- Base ---- */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Cabin', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--gsu-light-gray);
}

main { flex: 1; }
footer { margin-top: auto; }

/* ---- Utility classes ---- */
.bg-gsu-navy  { background-color: var(--gsu-navy) !important; }
.bg-gsu-blue  { background-color: var(--gsu-blue) !important; }
.text-gsu-navy { color: var(--gsu-navy) !important; }
.text-gsu-blue { color: var(--gsu-blue) !important; }
.text-gsu-gold { color: var(--gsu-gold) !important; }

/* ---- Navbar ---- */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s;
}
.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--gsu-gold-bright);
}
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--gsu-gold-bright);
    font-weight: 600;
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: var(--gsu-blue);
    border-color: var(--gsu-blue);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--gsu-navy);
    border-color: var(--gsu-navy);
}
.btn-outline-primary {
    color: var(--gsu-blue);
    border-color: var(--gsu-blue);
}
.btn-outline-primary:hover {
    background-color: var(--gsu-blue);
    border-color: var(--gsu-blue);
    color: #fff;
}

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: 0.5rem;
}
.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
}
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* ---- Tables ---- */
.table th {
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
}
.table-hover tbody tr {
    transition: background-color 0.15s;
}
.table-hover tbody tr:hover {
    background-color: rgba(0, 93, 144, 0.04);
}

/* Person name link within table */
.person-dept-link {
    appearance: none;
    border: none;
    outline: none;
    padding: 0;
    background-color: transparent;
    color: var(--gsu-blue);
    cursor: pointer;
}
.person-dept-link:focus,
.person-dept-link:hover {
    text-decoration: underline;
    color: var(--gsu-navy);
}

/* Contact info links */
.table a[href^="tel:"],
.table a[href^="mailto:"] {
    color: var(--gsu-blue);
    text-decoration: none;
}
.table a[href^="tel:"]:hover,
.table a[href^="mailto:"]:hover {
    text-decoration: underline;
}

/* ---- Hero / search area ---- */
.directory-hero {
    background: linear-gradient(135deg, var(--gsu-navy) 0%, var(--gsu-blue) 100%);
    color: #fff;
    padding: 2.5rem 0 2rem;
}
.directory-hero h1 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.25rem;
}
.directory-hero .lead {
    opacity: 0.85;
    font-size: 1.05rem;
}

/* Search card that floats over the hero */
.search-card {
    margin-top: -1.5rem;
    position: relative;
    z-index: 10;
}

/* ---- Search mode pills ---- */
.search-mode-pills .nav-link {
    color: #6c757d;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    transition: color 0.15s, border-color 0.15s;
}
.search-mode-pills .nav-link:hover {
    color: var(--gsu-navy);
    border-bottom-color: var(--gsu-gold);
}
.search-mode-pills .nav-link.active {
    color: var(--gsu-navy);
    border-bottom-color: var(--gsu-gold-bright);
    background: none;
    font-weight: 600;
}

/* ---- Results area ---- */
#search-results:empty { display: none; }

/* Sign-in prompt banner */
.auth-prompt {
    background-color: rgba(0, 93, 144, 0.08);
    border-left: 4px solid var(--gsu-blue);
    border-radius: 0.25rem;
}
.auth-prompt a {
    color: var(--gsu-blue);
    font-weight: 600;
}

/* ---- Stat cards on sidebar ---- */
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gsu-navy);
}
.stat-card .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gsu-gray);
}

/* ---- Quick links panel ---- */
.quick-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    color: var(--gsu-navy);
    text-decoration: none;
    transition: color 0.15s;
}
.quick-link-item:last-child { border-bottom: none; }
.quick-link-item:hover { color: var(--gsu-blue); }
.quick-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ---- Spinner / loading ---- */
.search-spinner {
    display: none;
}
.search-spinner.active {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

/* ---- Alerts ---- */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* WCAG 2.2 SC 2.5.8 — Flash message close button must be ≥ 24×24 px.
   Bootstrap 5 default is 1em × 1em (16px at default font-size) — too small.
   We override to ensure the target meets the 24px minimum. */
.btn-close {
    min-width: 24px;
    min-height: 24px;
    width: 1.5rem;   /* 24px at 16px root */
    height: 1.5rem;
}

/* ---- Admin utilities ---- */

/* .hidden is toggled by admin JS to show/hide forms and messages.
   Bootstrap 5 no longer ships .hidden — define it here so the JS logic
   that was written against it continues to work without a full JS rewrite. */
.hidden { display: none !important; }

/* ---- Admin sidebar (reused from old, but modernized) ---- */
.admin-sidebar .list-group-item {
    border: none;
    border-radius: 0;
    padding: 0.6rem 1rem;
    font-size: 0.92rem;
}
.admin-sidebar .list-group-item.active {
    background-color: var(--gsu-blue);
    border-color: var(--gsu-blue);
}
.admin-sidebar .list-group-item i {
    width: 1.5rem;
    text-align: center;
    margin-right: 0.5rem;
}

/* ---- Print styles ---- */
@media print {
    .navbar, footer, .btn, .search-card,
    .directory-hero, .auth-prompt, .search-hints-card { display: none !important; }
    body { background: white !important; }
    main { margin: 0; padding: 0; }
    .container { padding: 0 0.5rem; }
    .card { border: 1px solid #dee2e6 !important; box-shadow: none !important; break-inside: avoid; }
    .shadow-sm { box-shadow: none !important; }
    table { font-size: 0.8rem; }
    a[href]:after { content: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .directory-hero { padding: 1.5rem 0 1rem; }
    .directory-hero h1 { font-size: 1.5rem; }
    .search-card { margin-top: -1rem; }
    .stat-card .stat-value { font-size: 1.25rem; }
}
