/* padding for anchor links */
.race {
  scroll-margin-top: 60px;
}f

.winner {
  font-size: 1.15em;
  color: #28a745; /* Green color for winner */
}

.incumbent {
  font-size: 1.15em;
  color: #28a745; /* Green color for winner */
}

.incumbent_a {
  font-size: 1.25em;
  color: #a10000;
}

.incumbent_b {
  font-size: 1.25em;
  color: #336699;
}
.day-blue {
  color: #336699; /* Day Blue */
}

.day-logo-sm-subdued {
  width: 125px;
  opacity: 0.4;
  margin-bottom: 0.5em;
  transition: opacity 0.3s ease;
}

.day-logo-sm-subdued:hover {
  opacity: 0.8;
}

.border-gold {
  border-bottom: 1px solid #a07a30 !important;
}
.reqd {
  color: #a10000;
}

.muted {
  color: #666 !important;
}

.smaller-text {
  font-size: 0.875em !important;
}

.form-label {
  font-weight: 600;
}

.form-container {
  text-align: center; /* Centers any inline elements or buttons horizontally */
}

p.in-page-link {
  text-transform: uppercase;
  text-align: right !important;
  font-size: smaller;
  padding-top: 0.25em;
  margin-bottom: 0 !important;
}

p.in-page-link a {
  text-decoration: none;
  color: cornsilk;
}

span.in-page-link a {
  text-decoration: none;
  color: cornsilk;
}

p.in-page-link a:hover {
  color: #f7d084;
  text-decoration: underline;
}

span.in-page-link a:hover {
  color: #f7d084;
  text-decoration: underline;
}

.page-top {
  padding-top: 0 !important;
  margin-bottom: 0;
  text-align: right !important;
}

.page-top a {
  color:#336699!important;
}

.page-top a:hover {
  color: #a10000!important;
}

/* Normal state link color */
.navbar-dark .navbar-nav .nav-link {
  color: #ededed;
}

/* Hover and focus state link color */
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #f7d084;  
}
/* Custom CSS */
.table thead th {
  background-color: #222 !important; /* Your custom color */
  color: #ffffff !important; /* Text color */
  /* box-shadow: none !important;          /* Removes Bootstrap's overlay shadow */
}

.custom-card-header {
  display: flex;
  justify-content: space-between; /* Pushes items to opposite walls */
  align-items: baseline; 
}

.custom-card-footer {
  display: flex;
  justify-content: space-between; /* Pushes items to opposite walls */  
}

.custom-card-footer a  {
  color:#336699!important;
}

.custom-card-footer a:hover  {
  color:#a10000!important;
}

/*#row-head.table-primary {
  color: #fff;
  background-color: #336699 !important;
}*/

.table-primary {
  --bs-table-bg: #336699; /* Changes the main background color */
  --bs-table-striped-bg: #336699; /* Changes the background if .table-striped is used */
  --bs-table-active-bg: #336699; /* Changes the background if .table-active is used */
  --bs-table-hover-bg: #336699; /* Changes the background if .table-hover is used */
  --bs-table-color: #fff; /* Changes the text color */
  --bs-table-border-color: #222; /* Changes the border color */
  --bs-table-hover-color: #fff;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-striped-color:var(--bs-table-striped-color)
  --bs-table-color-type: var(--bs-table-striped-color);
  --bs-table-bg-type: var(--bs-table-striped-bg);
}

/* Override the local variables inside your custom class */
.custom-tooltip {
  --bs-tooltip-bg: #dedede;     /* Background color */
  --bs-tooltip-color: #a10000;    /* Text color */
  --bs-tooltip-padding-x: 12px;   /* Horizontal padding */
  --bs-tooltip-padding-y: 10px;    /* Vertical padding */
  --bs-tooltip-border-radius: 5px;/* Corner roundness */
}

/* 1. Add a border to the main tooltip box */
.tooltip .tooltip-inner {
  border: 1px solid #222; /* Your border color */
}

/* 2. Style the arrow borders based on tooltip placement */

/* Top Tooltip (Arrow points down, add border to top of arrow) */
.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #222; 
}

/* Bottom Tooltip (Arrow points up, add border to bottom of arrow) */
.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #222;
}

/* Left/Start Tooltip (Arrow points right, add border to left of arrow) */
.tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: #222;
}

/* Right/End Tooltip (Arrow points left, add border to right of arrow) */
.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: #222;
}


/* Reset the internal Bootstrap variables for your specific class on hover */
.table-hover tbody tr.no-hover:hover > th,
.table-hover tbody tr.no-hover:hover > td {
  --bs-table-hover-bg: transparent;
  box-shadow: none !important; 
}

/* override bs default bg color for votes column */
.vote-cell-color {
  --bs-table-bg: rgb(51, 102, 153 ,.10)/* Your custom color */
}

.vote-cell-color-a {
  --bs-table-bg: rgb(51, 102, 153 ,.10)/* Your custom color */
}

.progress, .progress-stacked {
  --bs-progress-bg: #cacaca;
}

hr {
  margin: 10px -5px 0 -5px;
}

span.th-right {
  padding-right: 15px;
  display: inline-block;
}

span.th-left {
  padding-left: 15px;
  display: inline-block;
}

.align-right {
  text-align: right;
}

.t-header-caps {
  text-transform: uppercase;
}
header.header-top  {
    display: flex;
    justify-content: space-between;
    align-items: center; /* or flex-start, flex-end */
}
.flextop {
    display: flex;
    justify-content: space-between;
    align-items: center; /* or flex-start, flex-end */
}

.datehed {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-container {
  display: flex;
  flex-wrap: wrap; /* Allows items to drop to the next line */
  gap: 10px;       /* Adds spacing between items */
}

.flex-item {
  /* flex: flex-grow | flex-shrink | flex-basis */
  flex: 1 1 300px; 
  /* 
    - flex-grow (1): Items will expand to fill empty space
    - flex-shrink (1): Items will shrink if the screen gets too small
    - flex-basis (300px): Items prefer to be 300px wide. 
      If a mobile screen is only 360px wide, they will automatically drop below one another.
  */
}


/* NAVBAR OVERRIDES*/
.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    margin-right: var(--bs-navbar-brand-margin-end);
    font-size:unset;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

/*
 === Google Fonts ===
*/

/* --- GoogleSansFlex-Variable --- */
@font-face {
  font-family: "GoogleSansFlex-VariableFont_GRAD\,ROND\,opsz\,slnt\,wdth\,";
  src: url("/fonts/Google_Sans_Flex/GoogleSansFlex-VariableFont_GRAD\,ROND\,opsz\,slnt\,wdth\,wght.ttf")
    format(ttf);
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  font-family:
    "GoogleSansFlex-VariableFont_GRAD\,ROND\,opsz\,slnt\,wdth\,", sans-serif;
  font-weight: 200;
}

/* --- Slabo27px-Regular --- */
@font-face {
  font-family: "Slabo27px-Regular", serif;
  src: url("/fonts/Slabo27px-Regular.ttf") format(ttf);
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Slabo27px-Regular", Georgia, serif;
  font-weight: 400;
}

/* progress bars */
/* The outer track of the progress bar */
div.progress {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden; /* Keeps the inner fill inside the rounded edges */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  width: var(--target-width, 100%); /* new for animation */
  overflow: hidden;
}

/* The inner filling with the gradient */
.progress-bar {
  height: 20px;
background: linear-gradient(to right, #720000 20%,#d30000 100%);
  border-radius: 10px 0 0 10px;
  transition: width 0.4s ease; /* Smooth animation when width changes */
  /* progree bar animation */
    /* Attach the fill animation on page load */
  animation: fillBar 1.5s ease-out forwards;
  transform-origin: left;
}
@keyframes fillBar {
  from {
    width: 0%;
  }
  to {
    width: var(--target-width);
  }
}
