:root {
    --bs-border-radius: 1rem; /* Adjust border radius */
    --bs-border-radius-sm: 1rem; /* Adjust border radius */
    /*--bs-body-bg: #f8f9fa; !* Adjust border radius *!*/
}

.table {
    --bs-table-bg: var(--bs-light-bg-subtle);
}

a {
    text-decoration: none; !important
}

body {
    font-family: 'Cabin', "serif"; !important
}

@media (max-width: 992px) {
  .container {
    max-width: 100%;
  }
}

.navbar-brand {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: bold;
    font-style: italic;
    color: #ffe66d !important;
}

.dataTables_filter {
    float: left !important;
}

.bg_winner {
    background-color: #FFFFBF !important;
    color: #000 !important;
}

.bg_second {
    background-color: #DFDFDF !important;
    color: #000 !important;
}

.bg_third {
    background-color: #FFDF9F !important;
    color: #000 !important;
}

.bg_points {
    background-color: #DFFFDF !important;
    color: #000 !important;
}

.bg_classified {
    background-color: #CFCFFF !important;
    color: #000 !important;
}

.bg_retired {
    background-color: #EFCFFF !important;
    color: #000 !important;
}

.list-group-horizontal .list-group-item {
	display: inline-block;
}
.list-group-horizontal .list-group-item {
	margin-bottom: 0;
	margin-left:-4px;
	margin-right: 0;
 	border-right-width: 0;
}
.list-group-horizontal .list-group-item:first-child {
	border-top-right-radius:0;
	border-bottom-left-radius:4px;
}
.list-group-horizontal .list-group-item:last-child {
	border-top-right-radius:4px;
	border-bottom-left-radius:0;
	border-right-width: 1px;
}

@media print {
    @page {
        size: A3; /* Set paper size to A4 */
        margin: 0; /* Reset margins */
    }
    html {
        font-size: 10pt !important;
    }
    html, body {
        margin: auto;
        padding: auto;
        /*width: 210mm;  Set width to A4 width */
        /*height: 297mm;  Set height to A4 height */
        /*box-sizing: border-box;
        /*transform-origin: top left;*/
    }
    a { text-decoration: none !important; }
}

/* Enhanced card styles */
.card-enhanced {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    background: linear-gradient(145deg, var(--bs-body-bg), var(--bs-tertiary-bg));
}

.card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.card-header-gradient {
    background: linear-gradient(135deg, #000000, #2e72ea);
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

.card-link-enhanced {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    margin: 8px 0;
    border-radius: 8px;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.card-link-enhanced:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    border-left: 3px solid var(--bs-primary);
    transform: translateX(5px);
}

.card-link-enhanced i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.1em;
}

.btn-grid {
  transition: all 0.15s ease-in-out;
}

.btn-grid:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn-grid:active {
  transform: translateY(0);
  box-shadow: none;
}

.text-purple {
    color: #6f42c1;
}

.caret-triangle {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid currentColor;
}

#navbar-search-results {
    position: fixed;
    top: 0;
    left: 10vw;
    width: 80vw;
    max-width: 80vw;
    max-height: 70vh;
    overflow-y: auto;
    white-space: normal;
}

.list-group-item.search-highlight {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.search-sub-link.search-sub-active {
    background-color: var(--bs-primary);
    color: #fff !important;
}

.search-main-link.search-active {
    background-color: var(--bs-primary);
    color: #fff !important;
    text-decoration: none;
    border: 1px solid var(--bs-primary);
    border-radius: var(--bs-border-radius-pill);
    padding: 0.125em 0.5em;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
  pointer-events: none;
}

#navbar-search-input {
  padding-left: 2.25rem;
  padding-right: 4.5rem;
}

.search-input {
  padding-left: 2.25rem;
}

.kbd-hint {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
  font-size: 0.95em;
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.6);
  border-radius: var(--bs-border-radius);
  padding: 0.05em 0.5em;
  pointer-events: none;
  white-space: nowrap;
}

.search-kbd {
  display: inline-block;
  color: var(--bs-secondary-color);
  font-size: 0.85em;
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.6);
  border-radius: var(--bs-border-radius);
  padding: 0 0.4em;
  background-color: var(--bs-body-bg);
}

.stats-cards-container {
  scrollbar-width: thin; /* Firefox */
}
.stats-cards-container::-webkit-scrollbar {
  height: 8px;
}
.stats-cards-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.correct-answer {
    background-color: #99ff9c !important;
}

.rating-cell {
    padding: 0.1rem !important;
}
.rating-cell > div {
    padding: 0.4rem;
    border: 0px solid #f8f9fa;
    border-radius: 12px;
}
.rating-10 { background-color: #633974; color: #fff; }
.rating-9 { background-color: #186a3b; color: #fff; }
.rating-7, .rating-8 { background-color: #28b463; color: #2a2a2a; }
.rating-5, .rating-6 { background-color: #f4d03f; color: #2a2a2a; }
.rating-3, .rating-4 { background-color: #f39c12; color: #2a2a2a; }
.rating-1, .rating-2 { background-color: #e74c3c; color: #fff; }

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.laps-scroll {
    overflow: auto;
    max-height: 70vh;
}
.laps-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #212529;
    color: #fff;
}

.pace-chart-scroll {
    overflow-x: auto;
}

.crumb-action-btn {
    padding: 0.125rem 0.375rem;
    font-size: 1em;
    line-height: 1;
    color: var(--bs-secondary-color);
    border-radius: var(--bs-border-radius-pill);
}

.crumb-action-btn:hover {
    color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.crumb-admin-btn {
    color: var(--bs-secondary-color);
}

.crumb-admin-btn:hover {
    color: var(--bs-danger);
    background-color: var(--bs-danger-bg-subtle);
}

.crumb-divider {
    color: var(--bs-secondary-color);
    opacity: 0.4;
    margin: 0 0.125rem;
    user-select: none;
}

.crumb-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(0.5rem);
    padding: 0.5rem 1rem;
    border-radius: var(--bs-border-radius-pill);
    box-shadow: var(--bs-box-shadow);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1100;
    pointer-events: none;
}

.crumb-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 576px) {
    .crumb-toast {
        font-size: 1em;
    }
}

.social-icon-link {
    color: var(--bs-secondary-color);
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.social-icon-link:hover {
    opacity: 0.7;
    color: var(--bs-secondary-color);
}

.footer-links a {
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-weight: 300;
}

.footer-links a:not(:last-child)::after {
    content: "·";
    margin-left: 0.25rem;
}

.footer-links a:hover {
    color: var(--bs-light);
}

/* Countdown inside pills */
.countdown-text {
    font-family: Consolas, Menlo, Monaco, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Star rating widget */
.star-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
}
.star-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.star-container small {
    font-size: 0.65rem;
    line-height: 1;
}
.star {
    font-size: 1.2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}
.star.filled {
    color: #ffc107;
}
.star:hover {
    color: #ffc107;
}
.star-rating.disabled .star {
    cursor: default;
    pointer-events: none;
}
.star-rating.disabled .star:hover {
    color: #ddd;
}

/* Standings list (homepage) */
.standing-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
}
.standing-row:hover {
    background: var(--bs-primary-bg-subtle);
}
.standing-pos {
    width: 1.75rem;
    text-align: center;
    font-weight: bold;
    color: var(--bs-secondary-color);
}
.standing-pill {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Standings tabs: full list, vertical scroll */
.standing-scroll {
    max-height: 11rem;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--bs-secondary-color) transparent;
}
.standing-scroll::-webkit-scrollbar {
    width: 0.3rem;
}
.standing-scroll::-webkit-scrollbar-thumb {
    background: var(--bs-secondary-color);
    border-radius: 0.25rem;
}
.standing-scroll::-webkit-scrollbar-track {
    background: transparent;
}
