/* Base styles and variables for G5Hive */

/* Force sticky table headers to work */
table thead.sticky {
    position: sticky !important;
    top: 80px !important; /* Match navbar height */
    z-index: 30 !important;
    background-color: #1A1A1A !important; /* Match your bg-jet color */
}
:root {
  /* Unified Black and Gold Theme */
  --primary: #B6862C; /* Logo Gold - matches sports-theme */
  --primary-dark: #B6862C; /* Logo Gold */
  --primary-light: #FFE066; /* Light Gold for hover */
  --secondary: #1A1A1A; /* Black */
  --accent: #FFC20E; /* Accent Gold */
  --card-bg: #232323; /* Card background */
  --card-border: #FFD700; /* Gold border/accent */
  --text-on-dark: #F5F5F5; /* WhiteSmoke */
  --text-on-light: #1A1A1A; /* Black */
  --muted-on-dark: #A9A9A9;
  --muted-on-light: #6c757d;
  --sidebar-bg: #2c3e50;
  --site-background-color: #000000; /* True black background */
  --text-color-on-dark-bg: #F5F5F5; /* White text on dark background */
}


html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #000000 !important; /* Force true black background */
    color: var(--text-color-on-dark-bg);
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    /* No color here; inherit from parent for context-aware readability */
}

.text-muted {
    color: var(--text-muted-on-dark-bg); /* Default muted text for dark backgrounds */
}

/* General link styling */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease-in-out, text-decoration 0.15s ease-in-out; /* Smooth transition */
}

/* Gold Glow for Logo */
.bg-gold {
  background-color: #FFD700 !important;
}


a:hover, a:focus {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Focus states */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
    outline: none;
}

/* Tailwind compatibility - these classes will supplement Tailwind when needed */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-accent { background-color: var(--accent) !important; }

/* Hide Blazor error UI by default, only show when .visible is present */
#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  z-index: 9999;
  background: #b32121;
  color: white;
  padding: 1rem 2rem;
  font-weight: 600;
  box-shadow: 0 -2px 8px #0008;
}
#blazor-error-ui.visible {
  display: block;
}


/* Focus and active states */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.15rem var(--primary-light), 0 0 0 0.25rem var(--accent);
  outline: none;
}

/* Table cell alignment - center all table cells and headers by default */
table td,
table th {
  text-align: center !important;
}

/* Loading spinner and states */

/* Add overlay markup in _Host.cshtml or MainLayout.razor if not present:
<div id="blazor-loading-overlay" style="display:none">
  <svg class="loading-progress">...</svg>
  <div class="loading-progress-text"></div>
</div>
*/
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #FFD700;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 8px #FFD70088);
}

.loading-progress circle:last-child {
    stroke: #FFC20E;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8);
    transition: stroke-dasharray 0.05s ease-in-out;
}

/* Removed legacy .loading-progress-text absolute positioning block (now handled by flexbox at end of file) */

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0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DY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Card styling for light backgrounds in dark theme */
.card {
    /* Cards inherit color from parent or use semantic variable only */
    /* Remove all direct color assignments */
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    /* Headings inherit color from parent context for accessibility */
}

.card .form-label,
.card label {
    /* Form labels inherit color from parent or use semantic variable only */
}

.card .text-muted {
    color: #6c757d; /* Standard Bootstrap muted color, or adjust as needed for card context */
}

/* Gold Outline Button */

/* IDP Waiver Watchlist Search Input Fix */
.idp-search-input {
  color: #1A1A1A !important;
  background: #fff !important;
  border: 1.5px solid #FFD700 !important;
  border-radius: 6px !important;
  opacity: 1 !important;
  box-shadow: none !important;
  transition: border 0.2s;
  font-weight: 500;
}

/* Admin Input Text (used in filter/search dropdowns) */
.admin-input-text {
  color: #1A1A1A !important;
  background: #fff !important;
  border: 1.5px solid #FFD700 !important;
  border-radius: 6px !important;
  opacity: 1 !important;
  box-shadow: none !important;
  transition: border 0.2s;
  font-weight: 500;
}
.admin-input-text::placeholder {
  color: #888 !important;
  opacity: 1 !important;
}
.bg-black .admin-input-text {
  color: #FFD700 !important;
  background: #232323 !important;
  border: 1.5px solid #FFD700 !important;
}
.bg-black .admin-input-text::placeholder {
  color: #FFD700cc !important;
}
.bg-white .admin-input-text {
  color: #1A1A1A !important;
  background: #fff !important;
  border: 1.5px solid #FFD700 !important;
}
.bg-white .admin-input-text::placeholder {
  color: #888 !important;
  opacity: 1 !important;
}

.idp-search-input::placeholder {
  color: #888 !important;
  opacity: 1 !important;
}
.bg-black .idp-search-input {
  color: #FFD700 !important;
  background: #232323 !important;
  border: 1.5px solid #FFD700 !important;
}
.bg-black .idp-search-input::placeholder {
  color: #FFD700cc !important;
}
.bg-white .idp-search-input {
  color: #1A1A1A !important;
  background: #fff !important;
  border: 1.5px solid #FFD700 !important;
}
.bg-white .idp-search-input::placeholder {
  color: #888 !important;
}


.btn-gold-outline {
    color: var(--primary);
    background-color: transparent;
    border-color: var(--primary);
    border-width: 1px;
    border-style: solid;
    padding: 0.375rem 0.75rem; /* Match Bootstrap's .btn padding */
    font-size: 1rem; /* Match Bootstrap's .btn font-size */
    line-height: 1.5; /* Match Bootstrap's .btn line-height */
    border-radius: 0.25rem; /* Match Bootstrap's .btn border-radius */
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-gold-outline:hover,
.btn-gold-outline:focus,
.btn-gold-outline:active {
    color: var(--light); /* Near Black text on gold background */
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-gold-outline:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.5); /* Gold focus ring */
}

.btn-gold-outline:active {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

/* Ensure btn-sm variant of gold outline looks correct */
.btn-sm.btn-gold-outline, .btn-group-sm > .btn-gold-outline.btn {
    padding: 0.25rem 0.5rem;
    font-size: .875rem;
    border-radius: 0.2rem;
}

/* Primary Gold Button */
.btn-primary-gold {
    color: #1A1A1A; /* Direct Dark text (Near Black) */
    background-color: #D4AF37; /* Direct Gold background */
    border-color: #D4AF37; /* Direct Gold border */
    border-width: 1px;
    border-style: solid;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-primary-gold:hover,
.btn-primary-gold:focus,
.btn-primary-gold:active {
    color: #1A1A1A; /* Direct Dark text */
    background-color: #B8860B; /* Direct Darker gold on hover/active (var(--secondary)) */
    border-color: #B8860B; /* Direct Darker gold border */
}

.btn-primary-gold:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.5); /* Gold focus ring */
}

/* Text on white backgrounds */
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4,
.bg-white h5,
.bg-white h6,
.bg-white p,
.bg-white span,
.bg-white div {
    color: #1A1A1A !important; /* Direct Near Black text on white backgrounds */
}

/* Sidebar specific styles */

#blazor-loading-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100vh;
    width: 100vw;
    z-index: 9999;
    background: rgba(10,10,10,0.93);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    line-height: normal;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0);
}
#blazor-loading-overlay > * {
    margin: 0;
    line-height: 1;
}
#blazor-loading-overlay svg.loading-progress {
    display: block;
    vertical-align: middle;
}

.loading-progress-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 0 8px #FFD70088;
    position: static;
    margin: 0;
    text-align: center;
    pointer-events: none;
    user-select: none;
}

.loading-progress {
    position: relative;
    display: block;
    width: 10rem;
    height: 10rem;
    align-self: center;
    overflow: visible;
}

.loading-progress circle {
    fill: none;
    stroke: #FFD700;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 8px #FFD70088);
}

.loading-progress circle:last-child {
    stroke: #FFC20E;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8);
    transition: stroke-dasharray 0.05s ease-in-out;
}

/* Removed legacy .loading-progress-text absolute positioning block (now handled by flexbox at end of file) */

.nav-scrollable {
    background-color: var(--sidebar-bg);
}

.nav-divider {
    border: none; /* Remove the line */
    height: 1px;
    background-color: transparent; /* Ensure no background color shows if hr has default bg */
    margin: 0.5rem 1rem; /* Keep some vertical spacing, add horizontal for consistency if it was full width */
}

/* Override for specific text elements that should remain gold or other theme colors */
.bg-white .text-primary,
.bg-white .text-accent {
    color: var(--primary) !important; /* Keep primary color for specific elements if intended */
}

.bg-white .text-muted {
    color: #6c757d !important; /* Bootstrap's default muted, or a theme-specific dark gray */
}
