
/** ************************************
 *   Sortable table headers (see the table.gbb-sortable code in gbb.js)
 ***************************************/
.gbb-sortable-col {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.gbb-sortable-col:hover { background-color: rgba(0, 0, 0, .05); }
.gbb-sortable-col:focus-visible { outline: 2px solid #c40000; outline-offset: -2px; }
.gbb-sort-icon {
    font-size: .7em;
    margin-left: 6px;
    vertical-align: .1em;
}
.gbb-sort-icon-inactive { opacity: .25; }
.gbb-sort-icon-active   { opacity: 1; color: #c40000; }

/*
 * Server-sorted headers: the header itself is a link that reloads the page with new sort
 * parameters. Used where the table is paged, because the click-to-sort above reorders the
 * rows already in the DOM and so would only ever sort the page being looked at.
 */
.gbb-sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.gbb-sort-link:hover { color: #c40000; }
.gbb-sort-link:focus-visible { outline: 2px solid #c40000; outline-offset: 2px; }

/** ************************************
 *   Submit-button loading state (see the 'submit' listener in gbb.js).
 *   A button's content is swapped for this the moment a real form submission
 *   begins. Built from conic-gradient + a radial-gradient mask rather than a
 *   spinner GIF or Bootstrap's spinner-border, so it stays crisp at any size,
 *   costs no image request, and inherits currentColor - it matches a green
 *   Save button, a red Delete button, or an outline button with no extra
 *   markup or per-button color classes.
 ***************************************/
.gbb-btn-loading-label {
    display: inline-flex;
    align-items: center;
    gap: .5em;
}
.gbb-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: none;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, currentColor 85%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 0.16em), #000 calc(100% - 0.16em));
            mask: radial-gradient(farthest-side, transparent calc(100% - 0.16em), #000 calc(100% - 0.16em));
    animation: gbb-spin .65s linear infinite;
}
@keyframes gbb-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .gbb-spinner { animation-duration: 1.6s; }
}

/** ************************************
 *   GENERAL
 ***************************************/
* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body, html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
}

/* Main content area should grow to push footer down.
   Do NOT include .container here - that would prevent the navbar's
   inner container from shrinking on narrow viewports. */
main, .main-content {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

.bordered {
    border: 1px solid #aaa;
}

.top-right-radius {
    border-top-right-radius: 5px !important;
}

.required:before {
    content:"* " !important;
    color: #f00 !important;
}

.small-link {
    text-decoration: none;
    font-size: 12px;
}

.mtn5 {
    margin-top: -5px !important;
}

a.btn-success {
    color: #fff !important;
}


/***************************************
 *   Admin Menu Styling
 ***************************************/

.list-group {
    font-size: 12px;
}

/* Sidebar menu items never wrap - sidebar expands to fit long items */
@media (min-width: 576px) {
    .list-group-item {
        white-space: nowrap;
    }
}

/* Sidebar category headings */
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #aaa;
    padding: 12px 12px 2px 12px;
    user-select: none;
    cursor: default;
}

.sidebar-nav > .sidebar-section-label:first-child {
    padding-top: 4px;
}

/* Flat (no rounded corners) list-groups inside the sidebar nav */
.sidebar-nav .list-group {
    border-radius: 0;
}

.sidebar-nav .list-group-item {
    border-radius: 0 !important;
}

/* Smooth transitions on all sidebar items */
.list-group-item {
    transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Normal state: icons muted gray */
.list-group-item:not(.active) i {
    color: #6c757d;
    transition: color 0.15s ease;
}

/* Hover on non-active items: faint left-bar preview */
.list-group-item.list-group-item-action:not(.active):hover {
    box-shadow: inset 3px 0 0 rgba(255, 10, 0, 0.25);
}

/* Active item: left accent bar + subtle tint + dark bold text */
.list-group-item.active {
    background-color: rgba(255, 10, 0, 0.07);
    border-color: #dee2e6;
    box-shadow: inset 3px 0 0 #ff0a00;
    color: #1a1a1a;
    font-weight: 600;
}

.list-group-item.active:hover {
    background-color: rgba(255, 10, 0, 0.11);
}

/* Active item: icon turns brand red */
.list-group-item.active i {
    color: #ff0a00 !important;
}

.top-left-radius {
	border-top-left-radius: 5px !important;	
}

/** ************************************
 *   Nav Bar
 ***************************************/
.navbar {
    padding: 0 !important;
    color: #000 !important;
    /*background-color: #9BDDFF !important;*/ /* Columbia Blue */
    background-color: #ff0a00 !important; /* Scarlett Red */
    border-bottom: 8px solid #9bddff !important;
}

.navbar-toggler, .navbar-toggler:focus {
    border-color: #fff !important;
    box-shadow: none !important;
}

/*#mainNav .navbar-nav .nav-item .nav-link {
    color: #7a6000 !important;
}*/

#mainNav .navbar-brand img {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    max-width: 100%;
}

@media (max-width: 575px) {
    #mainNav .navbar-brand {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/** ************************************
 *   LOGIN & PASSWORD RESET PAGES
 ***************************************/
#login-username,
#login-password {
    width: 250px;
}

.limiter {
    width: 100%;
    margin: 0 auto;
}

.container-login100 {
    width: 100%;
    min-height: 75vh;  /* Changed from margin-top: 200px */
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;  /* This centers vertically */
    padding: 15px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
    z-index: 1;
}

/*.wrap-login100 {
    max-width: 390px;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
}*/

.wrap-login100 {
    max-width: 390px;
    margin-top: -175px;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
}

.login100-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #7e333a;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    display: block;
}

.login100-form {
    width: 100%;
    margin-top: 20px;
    border-radius: 10px;
    background-color: #fff;
    padding: 0 15px 10px 20px;
}

/** ************************************
 *   TOAST
 ***************************************/
#toastElement {
    position: fixed !important;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    border: .1rem solid darkgray;
    border-radius: 7px;
    background-color: white;
}

#toastHeader {
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    margin: 0;
}

#toastBody {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Make close button visible on all toast types */
#toastHeader .btn-close {
    color: #333 !important;
    opacity: 0.7;
}

#toastHeader .btn-close:hover {
    opacity: 1;
}

/* For white backgrounds (like error toasts), make sure X is dark */
#toastHeader.bg-danger .btn-close {
    filter: invert(0);
}

/* For colored backgrounds, make X white */
#toastHeader.bg-success .btn-close,
#toastHeader.bg-info .btn-close {
    filter: invert(1) brightness(2);
}

/* Toast progress bar container */
.toast-progress {
    height: 6px;  /* Increased from 4px */
    background-color: rgba(0, 0, 0, 0.1);  /* Darker background so you can see the container */
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    overflow: hidden;
}

/* Toast progress bar - starts at 0%, fills to 100% */
.toast-progress-bar {
    height: 100%;
    width: 0%;
    background-color: rgba(0, 0, 0, 0.5);  /* More opaque */
    border-bottom-left-radius: 7px;
}

/* Different colors for different toast types */
#toastHeader.bg-success ~ .toast-progress .toast-progress-bar {
    background-color: #28a745;
}

#toastHeader.bg-danger ~ .toast-progress .toast-progress-bar {
    background-color: #ff0a00;
}

#toastHeader.bg-warning ~ .toast-progress .toast-progress-bar {
    background-color: #ffc107;
}

#toastHeader.bg-info ~ .toast-progress .toast-progress-bar {
    background-color: #17a2b8;
}

/* Error/Danger toast styling - white with red border */
#toastHeader.bg-danger {
    background-color: #fff !important;
    color: #333 !important;
    border-left: 4px solid #ff0a00;
    border-top: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

/* Make the error icon your red color */
#toastHeader.bg-danger .fa-circle-exclamation {
    color: #ff0a00 !important;
}

/* Keep success green */
#toastHeader.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

/* Style other toast types */
#toastHeader.bg-warning {
    background-color: #ffc107 !important;
    color: #333 !important;
}

#toastHeader.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

/* Add subtle shadow on hover to indicate interactivity */
#toastElement:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}


/** ************************************
 *   COLORS
 ***************************************/
/* .text-green {
 	color: #2eb348 !important;
 }
 
 .text-blue {
 	color: #3d59a9 !important;
 }
 
 .text-msu {
 	color: #5e0009 !important;
 }

.bg-blue {
	background-color: #3d59a9 !important;
}*/

.text-primary {
    --bs-text-opacity: 1;
    color: #ff0a00 !important;
}

/** ************************************
 *   ROLE SWITCHER
 ***************************************/
#roleSwitcher {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 15px !important;
}

.dropdown-item.active {
    background-color: #ff0a00;
    color: white;
}

.dropdown-item.active:hover {
    background-color: #cc0800;
}



/** ************************************
 *   BORDERS
 ***************************************/
/*.white-border {
	border: 1px solid white;
} */
 
 
/** ************************************
 *   CARDS
 ***************************************/
/*.card {
    transform: translateZ(0) !important;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

.card-body {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

.card-columns {
	display: flex;
}*/


/** ************************************
 *   LINKS
 ***************************************/
/* unvisited link */
a:link,
a:visited,
a:hover,
a:active {
    color: #ff0a00;
}

/*
 * Anchors styled as buttons must keep the button's own text colour. The rule above is
 * more specific than Bootstrap's .btn, so without this an <a class="btn btn-danger">
 * rendered red text on a red background and was unreadable until hovered.
 *
 * Each state maps to the matching Bootstrap variable, so every variant stays correct,
 * including outline buttons whose text colour changes on hover.
 */
a.btn:link,
a.btn:visited {
    color: var(--bs-btn-color);
}
a.btn:hover {
    color: var(--bs-btn-hover-color);
}
a.btn:active,
a.btn.active {
    color: var(--bs-btn-active-color);
}
a.btn:disabled,
a.btn.disabled {
    color: var(--bs-btn-disabled-color);
}

a.nav-link:link,
a.nav-link:visited,
a.nav-link:active {
    color: #fff !important;
}

a.nav-link:hover {
    color: #9bddff !important;
}

/** ************************************
 *   LOGIN
 ***************************************/
#login-username, 
#login-password {
	width: 250px;
}

.limiter {
    width: 100%;
    margin: 0 auto;
}

.container-login100 {
    width: 100%;
    /* min-height: 75vh; */
    margin-top: 200px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
    z-index: 1;
}

.login100-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #7e333a;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    display: block;
}

.login100-form {
    width: 100%;
    margin-top: 20px;
    border-radius: 10px;
    background-color: #fff;
    padding: 0 15px 10px 20px;
}



/** ************************************
 *   INPUTS
 ***************************************/
/*input[type="checkbox" i], .form-check-input, #form2Example31 {
    background-color: #3d59a8 !important;
}

input[type="checkbox" i]:before, .form-check-input:before {
    background-color: #3d59a8 !important;
}*/


/** ************************************
 *   PRIMARY BUTTON
 ***************************************/
.btn-primary {
  color: #000 !important;
  background-color: #9bddff !important;
  border-color: #3d59a8 !important;
}

.btn-primary:hover {
    color: #000 !important;
    /* Darkened by ~15% to create contrast */
    background-color: #75caff !important;
    /* Darkened slightly more to maintain definition */
    border-color: #304685 !important;
}

.btn-primary:focus, .btn-primary.focus {
  color: #000 !important;
  background-color: #9bddff !important;
  border-color: #3d59a8 !important;
}

.btn-primary.disabled, .btn-primary:disabled {
    color: #000 !important;
    background-color: #9bddff !important;
    border-color: #007bff !important;
}

.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  color: #000;
  background-color: #9bddff;
  border-color: #005cbf;
}

.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-primary.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}

.btn, .btn-nofocus:focus {
  outline: none !important;
  box-shadow: none !important;
}


/** ************************************
 *   SUCCESS BUTTON
 ***************************************/
/*.btn-success {
  color: #fff !important;
  background-color: #31b44b !important;
  border-color: #258b39 !important;
}

.btn-success:hover {
  color: #fff !important;
  background-color: #258b39 !important;
  border-color: #31b44b !important;
}

.btn-success:focus, .btn-success.focus {
  color: #fff !important;
  background-color: #31b44b !important;
  border-color: #258b39 !important;
}

.btn-success.disabled, .btn-success:disabled {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active,
.show > .btn-success.dropdown-toggle {
  color: #fff;
  background-color: #1e7e34;
  border-color: #1c7430;
}

.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus,
.show > .btn-success.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);
}*/


/** ************************************
 *   FONTAWESOME ICONS
 ***************************************/
/* i {
 	color: #2eb348 !important;
 }*/
 

/** ************************************
 *   TITLED BORDER
 ***************************************/
/*.titledborder {
  border-color: #343a40 !important;
  border-width: 1px !important;
}

.titledborder-title {
  font-size: 16px;
  font-weight: 500;
  margin-left: 10px;
  margin-top: -13px;
  background-color: #fff;
  display: table;
  color: #343a40;
  padding: 0 5px;
}

.titledborder-content {
  padding: 0 5px 5px 5px;
}*/


/** ************************************
 *   ANIMATION
 ***************************************/
/*.animated-logo {
   background-repeat: no-repeat;
   background-position: left top;
   -webkit-animation-duration: 3s;
   animation-duration: 3s;
   -webkit-animation-fill-mode: both;
   animation-fill-mode: both;
}

@-webkit-keyframes fadeIn {
   0% {opacity: 0;}
   100% {opacity: 1;}
}

@keyframes fadeIn {
   0% {opacity: 0;}
   100% {opacity: 1;}
}

.fadeIn {
   -webkit-animation-name: fadeIn;
   animation-name: fadeIn;
}
   
.fade-in-text {
  animation: fadeIn 3s;
}*/



/** ************************************
 *   ERROR PAGE
 ***************************************/
/*#errorImage {
	max-height: 200px;
} */


       
/** ************************************
 *   FONT WEIGHT
 ***************************************/
 .fw100 {font-weight: 100 !important;}
 .fw200 {font-weight: 200 !important;}
 .fw300 {font-weight: 300 !important;}
 .fw400 {font-weight: 400 !important;}
 .fw500 {font-weight: 500 !important;}
 .fw600 {font-weight: 600 !important;}
 .fw700 {font-weight: 700 !important;}
 .fw800 {font-weight: 800 !important;}
 .fw900 {font-weight: 900 !important;}
 
 
 /** ************************************
 *   FONT SIZE (PERCENT)
 ***************************************/
 .fs110p {font-size: 110% !important;}
 .fs120p {font-size: 120% !important;}
 .fs130p {font-size: 130% !important;}
 .fs140p {font-size: 140% !important;}
 .fs150p {font-size: 150% !important;}
 .fs160p {font-size: 160% !important;}
 .fs170p {font-size: 170% !important;}
 .fs180p {font-size: 180% !important;}
 .fs190p {font-size: 190% !important;}
 .fs200p {font-size: 200% !important;}
 .fs210p {font-size: 210% !important;}
 .fs220p {font-size: 220% !important;}
 .fs230p {font-size: 230% !important;}
 .fs240p {font-size: 240% !important;}
 .fs250p {font-size: 250% !important;}
 .fs260p {font-size: 260% !important;}
 .fs270p {font-size: 270% !important;}
 .fs280p {font-size: 280% !important;}
 .fs290p {font-size: 290% !important;}
 .fs300p {font-size: 300% !important;}


/** ************************************
 *   ADMIN SETTINGS PAGE
 ***************************************/
.settings-container {
    display: flex;
    min-height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    margin-top: 20px;
}

.settings-sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.settings-sidebar .section-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.settings-sidebar .section-item:hover {
    background: #e9ecef;
}

.settings-sidebar .section-item.active {
    background: #007bff;
    color: white;
    font-weight: 600;
}

.settings-sidebar .section-item i {
    margin-right: 10px;
    width: 20px;
}

.settings-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.settings-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.settings-header h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.settings-header p {
    margin: 0;
    color: #666;
}

.setting-row {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    flex: 0 0 300px;
    padding-right: 30px;
}

.setting-label .label-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.setting-label .label-description {
    font-size: 0.9em;
    color: #666;
}

.setting-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-input input[type="text"],
.setting-input input[type="number"],
.setting-input input[type="email"],
.setting-input input[type="url"],
.setting-input textarea,
.setting-input select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.setting-input textarea {
    min-height: 80px;
    resize: vertical;
}

.setting-input input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.btn-reset {
    padding: 6px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-reset:hover {
    background: #5a6268;
}

.settings-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-save {
    padding: 10px 30px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.btn-save:hover {
    background: #0056b3;
}

.btn-cancel {
    padding: 10px 30px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-cancel:hover {
    background: #5a6268;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}



/** ************************************
 *   MEDIA QUERIES
 ***************************************/

/*@media screen and (max-width: 992px) {
	h1.fluid {
		font-size: 2rem !important;
	}
}*/
 
/*
@media screen and (max-width: 768px) {
	.h1-fluid {
		font-size: 1.5rem !important;
	}
	#footer-funding {
		padding: 0 !important;	
	}
	#landing-page-computer {
		max-height: 200px;
	}
	#landing-bullets {
		margin-top: 20px !important;
	}
	.mgmt-process {
		min-height: 200px;
	}
	.card-detail {
		padding-bottom: 24px;
	}
}
*/

/*@media screen and (max-width: 576px) {

	#forgotPasswordDiv {
		text-align: center;
		margin-top: 20px;
	}
	
}*/


/** ************************************
 *   MEDIA QUERY
 ***************************************/


/* Admin menu responsive sizing */
@media screen and (max-width: 768px) {
    .list-group-item {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 992px) {
    .list-group-item {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }
}
 
 
 
 
 
 
 
/** ************************************
 *   Full page layout top spacing
 *
 *   fullpageLayout has no sidebar and no spacer div, so its content started
 *   directly underneath the fixed navbar. The other layouts clear the nav with
 *   a spacer set to 110px on production and 138px in dev, the extra height
 *   being the orange TEST ENVIRONMENT banner.
 ***************************************/
.fullpage-content {
    margin-top: 70px;
}

/** ************************************
 *   Test environment banner height
 *
 *   The banner is rendered by fragments/nav only when app.is-production is false,
 *   and it is position:fixed so it takes no space in normal flow. Layouts add the
 *   test-banner-visible class to <body> in dev, which makes its height available to
 *   any page that needs to allow for it:
 *
 *       padding-top: calc(130px + var(--gbb-banner-height));
 *
 *   On production the class is absent, the variable resolves to 0, and nothing has
 *   to know whether the banner exists.
 ***************************************/
:root {
    --gbb-banner-height: 0px;
}
body.test-banner-visible {
    --gbb-banner-height: 28px;
}

/** ************************************
 *   Public legal / info pages (privacy, terms, contact, emailSetup)
 *
 *   These live here rather than in a Thymeleaf style fragment: a <div th:replace>
 *   inside <head> is invalid HTML and stopped the rest of the head being applied,
 *   which left these pages completely unstyled.
 ***************************************/
.legal-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    /* Clears the fixed navbar, plus the test banner when present in dev */
    padding: calc(130px + var(--gbb-banner-height, 0px)) 0 60px;
    text-align: center;
}
.legal-hero h1 { font-weight: 700; }
.legal-body { padding: 50px 0 70px; }
.legal-content { line-height: 1.75; }
.legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid #ff0a00;
    display: inline-block;
}
.legal-content ul { margin-bottom: 1.25rem; }
.legal-content li { margin-bottom: .5rem; }
.legal-callout {
    border: 1px solid #e8dcae;
    border-left: 5px solid #d4af37;
    border-radius: 6px;
    background: #fffdf4;
    padding: 16px 20px;
    margin: 1.25rem 0;
}

/* ---- Contact form ---- */
.contact-required { color: #dc3545; font-weight: 700; }
.challenge-box {
    border: 1px solid #cfe2ff;
    border-left: 5px solid #0d6efd;
    border-radius: 6px;
    background: #f1f6ff;
    padding: 16px 18px;
}
/* Honeypot: must stay off screen for people, still submitted by naive bots */
.hp-field {
    position: absolute;
    left: -5000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---- Email setup walkthrough ---- */
.es-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: calc(130px + var(--gbb-banner-height, 0px)) 0 70px;
    text-align: center;
}
.es-hero h1 { font-weight: 700; }
.es-address {
    display: inline-block;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1.15rem;
    font-weight: 600;
}
.es-body { padding: 56px 0 70px; }
.es-card {
    border: 1px solid #e3e3e3;
    border-top: 5px solid #ff0a00;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    height: 100%;
}
.es-card .card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.es-card ol { padding-left: 20px; margin-bottom: 0; }
.es-card ol li { margin-bottom: 8px; line-height: 1.55; }
.es-icon { color: #ff0a00; width: 1.3rem; text-align: center; }
.es-note {
    border-left: 4px solid #d4af37;
    background: #fffdf4;
    border-radius: 4px;
    padding: 14px 18px;
}

/* ---- Registration help note ---- */
.reg-help {
    border: 1px solid #e9ecef;
    border-left: 4px solid #0d6efd;
    border-radius: 6px;
    background: #f8f9fa;
    padding: 14px 16px;
}
.reg-help-icon { color: #0d6efd; font-size: 1.15rem; line-height: 1.4; }

/* ---- Registration progress card ---- */
.link-progress-card { border-top: 4px solid #ff0a00; }
.link-progress-bar { height: 24px; font-size: .8rem; }
.link-progress-bar .progress-bar { transition: width .4s ease; min-width: 2.5rem; }

/* ---- Band / Color Guard badge ---- */
.student-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .74rem;
    font-weight: 600;
    padding: .35em .7em;
    border: 1px solid transparent;
}
.student-type-badge.type-band  { background: #cfe2ff; color: #084298; border-color: #9ec5fe; }
.student-type-badge.type-guard { background: #d1e7dd; color: #0f5132; border-color: #a3cfbb; }
.student-type-badge.type-none  { background: #e9ecef; color: #495057; border-color: #ced4da; }

/** ************************************
 *   Events page
 ***************************************/
.ev-eyebrow {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #c40000;
    white-space: nowrap;
}
.ev-rule { flex: 1 1 auto; height: 2px; background: #e9ecef; }

.ev-card {
    border: 1px solid #e3e3e3;
    border-left: 5px solid #ff0a00;
    border-radius: 10px;
    box-shadow: 0 3px 14px rgba(0,0,0,.07);
    overflow: hidden;
}
.ev-date {
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 26px 12px;
    text-align: center;
}
.ev-month { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.ev-day   { font-size: 3.2rem; font-weight: 800; line-height: 1; margin: 2px 0; }
.ev-year  { font-size: .85rem; opacity: .75; }

/* Past event: same card shape, muted so it doesn't compete with what's upcoming */
.ev-card-past { opacity: .85; border-left-color: #adb5bd; }
.ev-card-past .ev-date { background: linear-gradient(160deg, #495057 0%, #343a40 60%, #212529 100%); }

.ev-title { font-weight: 700; color: #1a1a2e; }
.ev-meta  { font-size: .95rem; line-height: 1.65; }
.ev-icon  { color: #c40000; width: 1.3rem; text-align: center; margin-right: .35rem; }
.ev-address { color: #6c757d; font-size: .9rem; }

/* Calendar not yet published */
.ev-soon {
    border: 1px solid #e8dcae;
    border-radius: 10px;
    background: linear-gradient(180deg, #fffdf4 0%, #ffffff 70%);
    padding: 34px 32px;
    text-align: center;
}
.ev-soon-icon {
    width: 62px; height: 62px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fff8e6;
    border: 1px solid #e8dcae;
    display: flex; align-items: center; justify-content: center;
    color: #d4af37; font-size: 1.6rem;
}

.ev-tease {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 18px 16px;
    height: 100%;
    text-align: center;
}
.ev-tease-icon { color: #c40000; font-size: 1.4rem; display: block; margin-bottom: 8px; }

/** ************************************
 *   Modal fixes
 *
 *   modal-dialog-scrollable works by bounding .modal-content and letting .modal-body
 *   scroll inside it. Several of our modals wrap the body and footer in a <form>, which
 *   sits in between and breaks that chain: the form is not a flex container and its
 *   default min-height lets it grow past the dialog, so the body never gets a bounded
 *   height and no scrollbar appears. Making the form behave as the flex column restores it.
 ***************************************/
.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex-direction: column;
    min-height: 0;      /* allows the form to shrink below its content height */
    overflow: hidden;
}
.modal-dialog-scrollable .modal-content > form > .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}
.modal-dialog-scrollable .modal-content > form > .modal-footer {
    flex: 0 0 auto;
}

/* Roomier padding. Bootstrap's 1rem is tight once a dialog is modal-lg or wider. */
.modal-lg .modal-body,
.modal-xl .modal-body {
    padding: 1.5rem 1.75rem;
}
.modal-lg .modal-header,
.modal-xl .modal-header,
.modal-lg .modal-footer,
.modal-xl .modal-footer {
    padding: 1rem 1.75rem;
}

/* ---- Ticket attachments ---- */
.attach-list:empty { display: none; }
.attach-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
    margin-bottom: 5px;
}
.attach-row .attach-name { flex: 1 1 auto; word-break: break-all; }
.attach-row .attach-size { color: #6c757d; white-space: nowrap; }

.attach-thumb {
    display: block;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 4px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.attach-thumb:hover { border-color: #ff0a00; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.attach-thumb img { max-width: 100%; height: auto; border-radius: 4px; display: block; }

/** ************************************
 *   Communication portal
 ***************************************/
.comm-steps { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comm-step {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .9rem; font-weight: 600; color: #adb5bd;
}
.comm-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: #e9ecef; color: #6c757d; font-size: .8rem; font-weight: 700;
}
.comm-step.active { color: #1a1a2e; }
.comm-step.active .comm-step-num { background: #ff0a00; color: #fff; }
.comm-step.done   { color: #198754; }
.comm-step.done .comm-step-num { background: #198754; color: #fff; }
.comm-step-arrow { color: #ced4da; font-size: .8rem; }

.comm-card { border-top: 4px solid #ff0a00; }
.comm-parents { border-left: 4px solid #0d6efd; background: #f6f9ff; }

/* ---- Rich text editor ---- */
.editor-toolbar {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    border: 1px solid #ced4da; border-bottom: none;
    border-radius: 6px 6px 0 0; background: #f8f9fa; padding: 6px 8px;
}
.editor-toolbar button {
    border: 1px solid transparent; background: transparent;
    border-radius: 4px; padding: 4px 9px; font-size: .85rem; color: #343a40;
    min-width: 32px;
}
.editor-toolbar button:hover { background: #e9ecef; border-color: #dee2e6; }
.editor-sep { width: 1px; height: 20px; background: #dee2e6; margin: 0 4px; }

.editor-surface {
    border: 1px solid #ced4da; border-radius: 0 0 6px 6px;
    min-height: 260px; max-height: 460px; overflow-y: auto;
    padding: 14px 16px; background: #fff; font-size: .95rem; line-height: 1.7;
}
.editor-surface:focus { outline: none; border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13,110,253,.2); }
.editor-surface:empty::before {
    content: attr(data-placeholder); color: #adb5bd;
}
.editor-surface h2 { font-size: 1.15rem; font-weight: 700; margin: .6rem 0 .4rem; }

/* ---- Recipient review panel ---- */
.recipient-scroll { max-height: 420px; overflow-y: auto; padding: 0 1rem 1rem; }
.recipient-heading {
    position: sticky; top: 0; z-index: 1;
    background: #fff; padding: 8px 0 4px;
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #6c757d;
    border-bottom: 1px solid #e9ecef;
}
.recipient-row { padding: 5px 0; border-bottom: 1px solid #f4f5f6; font-size: .88rem; }
.recipient-row:last-child { border-bottom: none; }
.recipient-email { display: block; color: #6c757d; font-size: .78rem; word-break: break-all; }
.recipient-for   { display: block; color: #0d6efd; font-size: .74rem; font-style: italic; }

/* Rendered copy of a sent email */
.comm-preview { line-height: 1.75; }
.comm-preview img { max-width: 100%; height: auto; }

/* Inline filter box that sits beside toolbar buttons */
.filter-input-sm { max-width: 220px; }

/* ---- Email queue ---- */
.queue-tab-content { border-top-left-radius: 0; border-top-right-radius: 0; }
.queue-table { font-size: .9rem; }
.queue-col-toggle { width: 34px; }
.queue-col-date   { width: 140px; }

/* Long filter summaries and SMTP errors are kept to a couple of lines so one bad row
   cannot stretch the table; the full text is on the title attribute. */
.queue-audience, .queue-error {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; max-width: 340px;
}
.queue-error { max-width: 320px; }

.queue-children-cell { background: #f8f9fa; }
.queue-child {
    display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline;
    padding: 5px 0; border-bottom: 1px solid #eceef0;
}
.queue-child:last-child { border-bottom: none; }
.queue-child-email   { font-size: .85rem; word-break: break-all; min-width: 220px; }
.queue-child-error   { flex: 1 1 200px; }
.queue-child-actions { margin-left: auto; display: flex; gap: .75rem; }

.email-preview-frame {
    width: 100%; height: 60vh; border: 1px solid #dee2e6; border-radius: 6px; background: #fff;
}

/** ************************************
 *   TABS
 ************************************ */

/*
 * Folder tabs: the selected one is white and joins the panel below it, the rest sit back in
 * grey. Bootstrap leaves inactive tabs transparent, which on a white page makes a tab strip
 * look like a row of plain text and gives no sign that the other tabs exist at all.
 *
 * Text stays black throughout. Colour is not what marks the active tab here - the white fill
 * and the join to the panel are - so the label does not have to carry that job as well.
 */
.gbb-tabs {
    border-bottom: 1px solid #dee2e6;
    gap: .25rem;
    flex-wrap: wrap;
}

/*
 * The override of a.nav-link further up this file (white, for the red navbar) would make
 * these labels invisible, so the colour is forced back. The !important is only here to undo
 * that one.
 */
.gbb-tabs .nav-link,
.gbb-tabs .nav-link:link,
.gbb-tabs .nav-link:visited,
.gbb-tabs .nav-link:active {
    color: #212529 !important;
    background-color: #f1f3f5;
    border: 1px solid #dee2e6;
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
    padding: .5rem .95rem;
    /* Pulls the tab down over the strip's own border so the active one can cover it */
    margin-bottom: -1px;
}

.gbb-tabs .nav-link:hover {
    color: #000 !important;
    background-color: #e5e8eb;
    border-color: #ced4da #ced4da #dee2e6;
}

/*
 * White fill plus a white bottom border: the border under the strip is painted over, so the
 * tab and the panel read as one surface.
 */
.gbb-tabs .nav-link.active,
.gbb-tabs .nav-link.active:link,
.gbb-tabs .nav-link.active:visited,
.gbb-tabs .nav-link.active:hover {
    color: #212529 !important;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}

.gbb-tabs .nav-link:focus-visible {
    outline: 2px solid #86b7fe;
    outline-offset: -2px;
}

/*
 * For a tab strip whose content is not already inside a card. Gives the panel the same white
 * surface and side borders so the active tab has something to join onto.
 */
.gbb-tab-panel {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
    padding: 1rem;
}
