/* theme.css - color variables, link colors, and theme-specific rules */
/* Bootstrap Button Color Overrides - Match Original PHP Site */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #104eff;
    --bs-btn-border-color: #104eff;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0e42d9;
    --bs-btn-hover-border-color: #0d3ecc;
    --bs-btn-focus-shadow-rgb: 52, 105, 255;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0d3ecc;
    --bs-btn-active-border-color: #0c3bbf;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #104eff;
    --bs-btn-disabled-border-color: #104eff;
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #171a16;
    --bs-btn-border-color: #171a16;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #141613;
    --bs-btn-hover-border-color: #121512;
    --bs-btn-focus-shadow-rgb: 58, 60, 57;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #121512;
    --bs-btn-active-border-color: #111411;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #171a16;
    --bs-btn-disabled-border-color: #171a16;
}

.btn-success {
    --bs-btn-color: #000;
    --bs-btn-bg: #A4D233;
    --bs-btn-border-color: #A4D233;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #b2d952;
    --bs-btn-hover-border-color: #add747;
    --bs-btn-focus-shadow-rgb: 139, 179, 43;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #b6db5c;
    --bs-btn-active-border-color: #add747;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #A4D233;
    --bs-btn-disabled-border-color: #A4D233;
}

.btn-info {
    --bs-btn-color: #fff;
    --bs-btn-bg: #9954BB;
    --bs-btn-border-color: #9954BB;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #82479f;
    --bs-btn-hover-border-color: #7a4396;
    --bs-btn-focus-shadow-rgb: 168, 110, 197;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #7a4396;
    --bs-btn-active-border-color: #733f8c;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #9954BB;
    --bs-btn-disabled-border-color: #9954BB;
}

.btn-warning {
    --bs-btn-color: #000;
    --bs-btn-bg: #FFCD00;
    --bs-btn-border-color: #FFCD00;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #ffd526;
    --bs-btn-hover-border-color: #ffd21a;
    --bs-btn-focus-shadow-rgb: 217, 174, 0;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #ffd733;
    --bs-btn-active-border-color: #ffd21a;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #FFCD00;
    --bs-btn-disabled-border-color: #FFCD00;
}

.btn-danger {
    --bs-btn-color: #000;
    --bs-btn-bg: #E04F39;
    --bs-btn-border-color: #E04F39;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #e56957;
    --bs-btn-hover-border-color: #e3614d;
    --bs-btn-focus-shadow-rgb: 190, 67, 48;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #e67261;
    --bs-btn-active-border-color: #e3614d;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #E04F39;
    --bs-btn-disabled-border-color: #E04F39;
}

.btn-light {
    --bs-btn-color: #000;
    --bs-btn-bg: #f0f2f0;
    --bs-btn-border-color: #f0f2f0;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #cccecc;
    --bs-btn-hover-border-color: #c0c2c0;
    --bs-btn-focus-shadow-rgb: 204, 206, 204;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #c0c2c0;
    --bs-btn-active-border-color: #b4b6b4;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #f0f2f0;
    --bs-btn-disabled-border-color: #f0f2f0;
}

.btn-dark {
    --bs-btn-color: #fff;
    --bs-btn-bg: #000;
    --bs-btn-border-color: #000;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #262626;
    --bs-btn-hover-border-color: #1a1a1a;
    --bs-btn-focus-shadow-rgb: 38, 38, 38;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #333333;
    --bs-btn-active-border-color: #1a1a1a;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #000;
    --bs-btn-disabled-border-color: #000;
}
/* Georgia Tech Theme Colors */
:root,
[data-bs-theme=light] {
    --header-height: 5rem;
    --gt-primary: var(--color-primary, #104eff);
    --gt-secondary: var(--color-secondary, #171a16);
    --gt-accent: var(--color-accent, #b3a369);
    --gt-gold: #b3a369;
    --gt-gold-dark: #a4925a;
    --bs-blue: #0d6efd;
    --bs-indigo: #010101;
    --bs-purple: #5F249F;
    --bs-pink: #e3008c;
    --bs-red: #E04F39;
    --bs-orange: #FFCC00;
    --bs-yellow: #FFCD00;
    --bs-green: #A4D233;
    --bs-teal: #64CCC9;
    --bs-cyan: #9954BB;
    --bs-black: #000;
    --bs-white: #fff;
    --bs-gray: #556050;
    --bs-gray-dark: #171a16;
    --bs-gray-100: #f0f2f0;
    --bs-gray-200: #D6DBD4;
    --bs-gray-300: #b5beb1;
    --bs-gray-400: #94a18f;
    --bs-gray-500: #73826d;
    --bs-gray-600: #556050;
    --bs-gray-700: #363d33;
    --bs-gray-800: #171a16;
    --bs-gray-900: black;
    --bs-primary: var(--gt-primary);
    --bs-secondary: var(--gt-secondary);
    --bs-success: #A4D233;
    --bs-info: #9954BB;
    --bs-warning: #FFCD00;
    --bs-danger: #E04F39;
    --bs-light: #f0f2f0;
    --bs-dark: #000;
    --bs-primary-rgb: 13, 110, 253;
    --bs-secondary-rgb: 23, 26, 22;
    --bs-success-rgb: 164, 210, 51;
    --bs-info-rgb: 153, 84, 187;
    --bs-warning-rgb: 255, 205, 0;
    --bs-danger-rgb: 224, 79, 57;
    --bs-light-rgb: 240, 242, 240;
    --bs-dark-rgb: 0, 0, 0;
    --bs-body-color: #000;
    --bs-body-color-rgb: 0, 0, 0;
    --bs-body-bg: #f0f2f0;
    --bs-body-bg-rgb: 240, 242, 240;
    --bs-border-color: #b5beb1;
    --bs-link-color: var(--gt-primary);
    --bs-link-hover-color: #0033c2;
    --bs-form-valid-color: #A4D233;
    --bs-form-valid-border-color: #A4D233;
    --bs-form-invalid-color: #E04F39;
    --bs-form-invalid-border-color: #E04F39;
}

/* Content link styling - GT branded colors */
.container a:not(.nav-link):not(.navbar-brand):not(.btn),
.card a:not(.nav-link):not(.btn),
main a:not(.nav-link):not(.btn),
.content a:not(.nav-link):not(.btn) {
    color: var(--bs-link-color) !important;
    text-decoration: none !important;
}

.container a:not(.nav-link):not(.navbar-brand):not(.btn):hover,
.container a:not(.nav-link):not(.navbar-brand):not(.btn):focus,
.card a:not(.nav-link):not(.btn):hover,
.card a:not(.nav-link):not(.btn):focus,
main a:not(.nav-link):not(.btn):hover,
main a:not(.nav-link):not(.btn):focus,
.content a:not(.nav-link):not(.btn):hover,
.content a:not(.nav-link):not(.btn):focus {
    color: var(--bs-link-hover-color) !important;
}

/* Footer links - always black */
footer a,
footer .link {
    color: #000 !important;
    text-decoration: none !important;
}

footer a:hover,
footer a:focus,
footer .link:hover,
footer .link:focus {
    color: #333 !important;
}

/* Nav links - theme specific colors */
.navbar-nav .nav-link,
.nav-link {
    color: #000 !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.nav-link:hover,
.nav-link:focus {
    color: #333 !important;
    text-decoration: underline !important;
}

/* Dark theme nav links and content links */
[data-bs-theme=dark] .navbar-nav .nav-link,
[data-bs-theme=dark] .nav-link {
    color: #fff !important;
}

[data-bs-theme=dark] .navbar-nav .nav-link:hover,
[data-bs-theme=dark] .navbar-nav .nav-link:focus,
[data-bs-theme=dark] .nav-link:hover,
[data-bs-theme=dark] .nav-link:focus {
    color: #ccc !important;
}

[data-bs-theme=high-contrast] .navbar-nav .nav-link,
[data-bs-theme=high-contrast] .nav-link {
  color: var(--bs-link-color) !important;
}

[data-bs-theme=high-contrast] .navbar-nav .nav-link:hover,
[data-bs-theme=high-contrast] .navbar-nav .nav-link:focus,
[data-bs-theme=high-contrast] .nav-link:hover,
[data-bs-theme=high-contrast] .nav-link:focus {
  color: var(--bs-link-hover-color) !important;
  text-decoration: underline !important;
}

/* High-contrast header user/menu links need contrast against the gold header */
[data-bs-theme=high-contrast] header.navbar-main .nav-link,
[data-bs-theme=high-contrast] header.navbar-main .nav-link:hover,
[data-bs-theme=high-contrast] header.navbar-main .nav-link:focus {
  color: #000 !important;
}

/* Override Bootstrap link variables for content areas */
:root,
[data-bs-theme=light] {
    --bs-link-color: #3A5DAE;
    --bs-link-hover-color: #263e73;
}

/* Dark theme content link colors */
[data-bs-theme=dark] .container a:not(.nav-link):not(.navbar-brand):not(.btn),
[data-bs-theme=dark] .card a:not(.nav-link):not(.btn),
[data-bs-theme=dark] main a:not(.nav-link):not(.btn),
[data-bs-theme=dark] .content a:not(.nav-link):not(.btn) {
    color: var(--bs-link-color) !important;
    text-decoration: none !important;
}

[data-bs-theme=dark] .container a:not(.nav-link):not(.navbar-brand):not(.btn):hover,
[data-bs-theme=dark] .container a:not(.nav-link):not(.navbar-brand):not(.btn):focus,
[data-bs-theme=dark] .card a:not(.nav-link):not(.btn):hover,
[data-bs-theme=dark] .card a:not(.nav-link):not(.btn):focus,
[data-bs-theme=dark] main a:not(.nav-link):not(.btn):hover,
[data-bs-theme=dark] main a:not(.nav-link):not(.btn):focus,
[data-bs-theme=dark] .content a:not(.nav-link):not(.btn):hover,
[data-bs-theme=dark] .content a:not(.nav-link):not(.btn):focus {
    color: var(--bs-link-hover-color) !important;
}

[data-bs-theme=dark] {
    color-scheme: dark;
    --gt-primary: var(--color-primary, #7095ff);
    --gt-secondary: var(--color-secondary, #f0f2f0);
    --gt-accent: var(--color-accent, #b3a369);
    /* Brighter body text for higher contrast in dark mode */
    --bs-body-color: #f0f2f0;
    --bs-body-color-rgb: 181, 190, 177;
    --bs-body-bg: black;
    --bs-body-bg-rgb: 0, 0, 0;
    --bs-emphasis-color: #fff;
    --bs-emphasis-color-rgb: 255, 255, 255;
    --bs-secondary-color: rgba(181, 190, 177, 0.75);
    --bs-secondary-color-rgb: 181, 190, 177;
    --bs-secondary-bg: #171a16;
    --bs-secondary-bg-rgb: 23, 26, 22;
    --bs-tertiary-color: rgba(181, 190, 177, 0.5);
    --bs-tertiary-color-rgb: 181, 190, 177;
    --bs-tertiary-bg: #0c0d0b;
    --bs-tertiary-bg-rgb: 12, 13, 11;
    --bs-primary-text-emphasis: var(--gt-primary);
    --bs-secondary-text-emphasis: #747673;
    --bs-success-text-emphasis: #c8e485;
    --bs-info-text-emphasis: #c298d6;
    --bs-warning-text-emphasis: #ffe166;
    --bs-danger-text-emphasis: #ec9588;
    --bs-light-text-emphasis: #f0f2f0;
    --bs-dark-text-emphasis: #b5beb1;
    --bs-primary-bg-subtle: #031033;
    --bs-secondary-bg-subtle: #050504;
    --bs-success-bg-subtle: #212a0a;
    --bs-info-bg-subtle: #1f1125;
    --bs-warning-bg-subtle: #332900;
    --bs-danger-bg-subtle: #2d100b;
    --bs-light-bg-subtle: #171a16;
    --bs-dark-bg-subtle: #0c0d0b;
    --bs-primary-border-subtle: #0a2f99;
    --bs-secondary-border-subtle: #0e100d;
    --bs-success-border-subtle: #627e1f;
    --bs-info-border-subtle: #5c3270;
    --bs-warning-border-subtle: #997b00;
    --bs-danger-border-subtle: #862f22;
    --bs-light-border-subtle: #363d33;
    --bs-dark-border-subtle: #171a16;
    --bs-heading-color: inherit;
    --bs-link-color: var(--gt-primary);
    --bs-link-hover-color: #bad6ff;
    --bs-link-color-rgb: 110, 168, 254;
    --bs-link-hover-color-rgb: 186, 214, 255;
    --bs-code-color: #ee66ba;
    --bs-highlight-color: #b5beb1;
    --bs-highlight-bg: #665200;
    --bs-border-color: #363d33;
    --bs-border-color-translucent: rgba(255, 255, 255, 0.15);
    --bs-form-valid-color: #c8e485;
    --bs-form-valid-border-color: #c8e485;
    --bs-form-invalid-color: #ec9588;
    --bs-form-invalid-border-color: #ec9588;
}

[data-bs-theme=high-contrast] {
    color-scheme: dark;
    --gt-primary: #ffd200;
    --gt-secondary: #ffffff;
    --gt-accent: #b3a369;
    --bs-body-bg: #000;
    --bs-body-color: #fff;
    --bs-body-color-rgb: 255, 255, 255;
    --bs-body-bg-rgb: 0, 0, 0;
    --bs-border-color: #fff;
    --bs-link-color: #ffd200;
    --bs-link-hover-color: #fff;
    --bs-emphasis-color: #fff;
    --bs-secondary-color: #fff;
    --bs-secondary-bg: #000;
    --bs-primary: #ffd200;
    --bs-secondary: #fff;
    --bs-success: #7dff4d;
    --bs-info: #7ad3ff;
    --bs-warning: #ffd200;
    --bs-danger: #ff6b6b;
    --bs-light: #fff;
    --bs-dark: #000;
}

/* Light/Dark body overrides */
html {
    height: 100% !important;
    font-size: 16px;
}

body {
    font-family: "Roboto", Arial, Helvetica, sans-serif !important;
    height: 100% !important;
    padding-top: 80px !important;
    /* Remove fixed bottom padding so footer sits naturally after content */
    padding-bottom: 0 !important;
}

[data-bs-theme="light"] body {
    color: #292929 !important;
    background: rgb(248, 249, 250) !important;
}

[data-bs-theme=dark] body {
    color: #f0f2f0 !important;
    background-color: #171a16 !important;
}

[data-bs-theme=high-contrast] body {
    color: #fff !important;
    background-color: #000 !important;
}

[data-bs-theme=high-contrast] header.navbar-main .dropdown-menu {
    border: 1px solid rgba(255, 255, 255, 0.6);
}

[data-bs-theme=high-contrast] .card,
[data-bs-theme=high-contrast] .card-header,
[data-bs-theme=high-contrast] .card-body,
[data-bs-theme=high-contrast] .card-footer {
    background-color: #111 !important;
    color: #fff !important;
    border-color: #fff !important;
}

[data-bs-theme=high-contrast] .card {
    border-width: 2px !important;
}

[data-bs-theme=dark] h1.title,
[data-bs-theme=dark] .title.h1 {
    color: #b3a369;
}

/* Theme button styling */
#bd-theme.btn-link {
    color: inherit !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#bd-theme.btn-link:hover,
#bd-theme.btn-link:focus {
    color: inherit !important;
    text-decoration: underline !important;
}

[data-bs-theme=dark] #bd-theme.btn-link {
    /* Keep nav links untouched; make button-style links match BuzzPort blue */
    color: #6ea8fe !important;
}

[data-bs-theme=dark] #bd-theme.btn-link:hover,
[data-bs-theme=dark] #bd-theme.btn-link:focus {
    color: #4d86d9 !important;
}

/* Button links (Bootstrap .btn-link) use blue in dark mode */
/* Note: .btn-outline-secondary handles calendar/button links. Avoid styling generic .btn-link
   here to prevent header/account buttons from inheriting the blue color. */

/* Footer and navbar link emphasis in dark theme */
[data-bs-theme=dark] .text-muted {
    color: #b5beb1 !important;
}


[data-bs-theme="dark"] .admin-table-wrapper {
    border-color: #495057;
    background: #212529;
}

[data-bs-theme="high-contrast"] .admin-table-wrapper {
    border-color: #fff;
    background: #000;
}

[data-bs-theme="dark"] .admin-table thead th {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="high-contrast"] .admin-table thead th {
    background-color: #000;
    border-color: #fff;
    color: #fff;
}

[data-bs-theme="dark"] .admin-table th,
[data-bs-theme="dark"] .admin-table td {
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="high-contrast"] .admin-table th,
[data-bs-theme="high-contrast"] .admin-table td {
    border-color: #fff;
    color: #fff;
}

[data-bs-theme="dark"] .admin-table tbody tr {
    background-color: #212529;
}

[data-bs-theme="dark"] .pagination-wrapper {
    background-color: #343a40;
    border-color: #495057;
}

[data-bs-theme="high-contrast"] .pagination-wrapper {
    background-color: #000;
    border-color: #fff;
}

[data-bs-theme="dark"] .pagination-wrapper.top {
    border-bottom-color: transparent;
}

[data-bs-theme="dark"] .pagination-wrapper.bottom {
    border-top-color: transparent;
}

[data-bs-theme="dark"] .items-per-page-control label,
[data-bs-theme="dark"] .table-info {
    color: #adb5bd;
}

[data-bs-theme="high-contrast"] .items-per-page-control label,
[data-bs-theme="high-contrast"] .table-info {
    color: #fff;
}

[data-bs-theme="dark"] .items-per-page {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

[data-bs-theme="high-contrast"] .items-per-page {
    background-color: #000;
    border-color: #fff;
    color: #fff;
}

[data-bs-theme="dark"] .items-per-page:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .pagination-controls .page-link {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

[data-bs-theme="high-contrast"] .pagination-controls .page-link {
    background-color: #000;
    border-color: #fff;
    color: #fff;
}

[data-bs-theme="dark"] .pagination-controls .page-link:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .pagination-controls .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

[data-bs-theme="high-contrast"] .btn-primary {
    --bs-btn-color: #000;
    --bs-btn-bg: #ffd200;
    --bs-btn-border-color: #ffd200;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #ffe066;
    --bs-btn-hover-border-color: #ffe066;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #ffd200;
    --bs-btn-active-border-color: #ffd200;
}

[data-bs-theme="high-contrast"] .btn-outline-secondary {
    color: #fff;
    border-color: #fff;
}

[data-bs-theme="high-contrast"] .btn-outline-secondary:hover,
[data-bs-theme="high-contrast"] .btn-outline-secondary:focus {
    color: #000;
    background-color: #ffd200;
    border-color: #ffd200;
}

/* Make outline-style buttons (used for the calendar links) visible in light mode */
[data-bs-theme=light] .btn-outline-secondary {
    color: #000 !important;
    border-color: #000 !important;
    background-color: transparent !important;
}

[data-bs-theme=light] .btn-outline-secondary:hover,
[data-bs-theme=light] .btn-outline-secondary:focus {
    color: #fff !important;
    border-color: #000 !important;
    background-color:#000 !important;
}

/* Stronger specificity for light-theme calendar/button links in case other rules override them */
[data-bs-theme=light] .card .btn.btn-outline-secondary,
[data-bs-theme=light] .container .btn.btn-outline-secondary,
[data-bs-theme=light] main .btn.btn-outline-secondary {
    color: #000 !important;
    border-color: #000 !important;
    background-color: transparent !important;
}

[data-bs-theme=light] .card .btn.btn-outline-secondary:hover,
[data-bs-theme=light] .container .btn.btn-outline-secondary:hover,
[data-bs-theme=light] main .btn.btn-outline-secondary:hover {
    color: #fff !important;
    border-color: #000 !important;
    background-color: #000 !important;
}

/* Make outline-style buttons (used for the calendar links) visible in dark mode */
[data-bs-theme=dark] .btn-outline-secondary {
    color: #6ea8fe !important;
    border-color: #6ea8fe !important;
    background-color: transparent !important;
}

[data-bs-theme=dark] .btn-outline-secondary:hover,
[data-bs-theme=dark] .btn-outline-secondary:focus {
    color: #94bbf5 !important;
    border-color: #4d86d9 !important;
    background-color: #1f1f1f !important;
}

@media (forced-colors: active) {
    :root {
        --bs-body-bg: Canvas;
        --bs-body-color: CanvasText;
        --bs-link-color: LinkText;
        --bs-border-color: CanvasText;
    }
}

[data-bs-theme="high-contrast"] .pagination-controls .page-item.active .page-link {
    background-color: #ffd200;
    border-color: #ffd200;
    color: #000;
}

[data-bs-theme="high-contrast"] .list-group-item {
    background-color: #000;
    color: #fff;
    border-color: #fff;
}

[data-bs-theme="high-contrast"] .list-group-item-action:hover,
[data-bs-theme="high-contrast"] .list-group-item-action:focus {
    background-color: #ffd200;
    color: #000;
}
