/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo svg {
  width: 34px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top to .layout-page */
/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 72px !important;
}
/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 254px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

/* Hide logo on screen */
.print-logo {
    display: none;
}

/* Print-specific styles */
@media print {
    body * {
        visibility: hidden;
    }

    /* Show only leaderboard card + print logo */
    .card, .card *, .print-logo {
        visibility: visible;
    }

    /* Show logo only during print */
    .print-logo {
        display: block;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        margin-bottom: 10px;
    }

    .print-logo img {
        max-width: 180px;
        height: auto;
    }

    /* Make card full width and remove shadow/border */
    .card {
        position: absolute;
        top: 10px; /* adjust if logo height changes */
        left: 0;
        width: 100%;
        padding: 0 10px;
        font-size: 9px; /* smaller font for print */
        box-shadow: none !important;
        border: none !important;
        background: none !important;
    }

    /* Hide print button */
    #print-button {
        display: none;
    }

    /* Hide table title */
    .card-title {
        display: none;
    }

    /* Table formatting */
    .card table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
    }

    .card th, .card td {
        border: 1px solid #ccc;
        padding: 4px 6px; /* reduce padding to match row height */
        word-wrap: break-word;
        font-size: 9px; /* match other cells */
        height: 24px; /* explicit row height */
        vertical-align: middle; /* center text vertically */
        background: none !important; /* remove any background */
        font-weight: bold; /* keep bold for headers */
    }

    .card td.text-end {
        text-align: right;
    }

    /* Highlight current user row */
    .card tr.current-user {
        background-color: #fff3cd !important;
    }

    /* Footer styling */
    .card-footer {
        page-break-inside: avoid;
        text-align: center;
        margin-top: 10px;
        background: none !important;
    }
}

/* Driver Card Grid Layout */
.driver-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.driver-card {
    flex: 0 0 calc(33.33% - 10px); /* 3 per row on desktop */
    display: flex;
    cursor: pointer;
    align-items: center;
    padding: 8px;
    border: 2px solid #171e28;
    margin-bottom: 5px;
    border-radius: 5px;
}
.driver-card input[type="radio"] {
    display: none; /* hide radio but keep functionality */
}
.driver-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    pointer-events: none;
    border-radius: 50%;
    background-color: #171e28;
}

.driver-card .avatar {
    margin-left: px; /* adds space from left edge */
    margin-right: px; /* keeps spacing between image and text */
}

.avatar-lg img{
  width:60px;
  height:60px;
  object-fit:cover;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
    border: 2px solid #ffab1d;
}

.driver-row {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

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

.driver-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #171e28;
}

.driver-info {
    line-height: 1.2;
}

.driver-name {
    font-weight: 600;
    color: #CFCDE4;
}

.driver-team {
    font-size: 12px;
    color: #ACABC1;
}

.driver-selected {
    font-size: 12px;
    color: #ffab1d;
    font-weight: 500;
}

.driver-card.selected {
    outline: 2px solid #26293b;
}

.driver-group {
    font-size: 13px;
    font-weight: 500;
}

/* Drivers page: remove card background for group cards */
.drivers-page .card.card-bordered {
    background: none;   /* remove background color */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .driver-card {
        flex: 0 0 100%; /* 1 per row on tablets */
    }
}

@media (max-width: 576px) {
    .driver-card {
        flex: 0 0 100%; /* 1 per row on mobile */
    }
}

/* 5-week tracker */
.pick-tracker {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.pick-week {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
    color: #fff;
}
.completed { background-color: #ffab1d; }
.open { background-color: #2196F3; }
.locked { background-color: #9E9E9E; 
}

/* Hide the toggle arrow */
.menu-link.menu-toggle::after {
    display: none !important;
}

/* Remove extra padding reserved for the toggle */
.menu-link.menu-toggle {
    padding-right: 20px !important; /* adjust as needed */
}

.auth-cover-bg {
    background-image: url('../../assets/img/illustrations/cover.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100vh; /* ensures full height */
}

/* Pulsing dot for attention */
.menu-item .pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #f3af44; /* warning color */
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
  position: relative;
}

.menu-item .pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #f3af44;
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(0.6);
    opacity: 0.6;
  }
}
.driver-card.greyed {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}
.driver-card.selected {
    opacity: 1 !important;
    pointer-events: auto;
    border: 2px solid #ffc107;
}
.driver-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.driver-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    background: #1d2530;
    cursor: pointer;
    min-width: 220px;
}
.driver-info {
    display: flex;
    flex-direction: column;
}
.driver-selected {
    font-size: 0.8rem;
    margin-top: 5px;
}
.flash-wrapper {
    overflow: hidden;
    transition: height 0.5s ease, margin 0.5s ease, padding 0.5s ease;
  }
  .flash-message {
    margin: 0;
  }
.small-badge {
    font-size: 0.75rem;   /* slightly smaller than default */
    padding: 0.25em 0.4em; /* smaller padding */
    vertical-align: middle;
}
/* Base pulse animation */
@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Drivers menu dot */
.drivers-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #ffab1d;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

/* Race In Progress dot */
.race-dot {
  display: inline-block;
  width: 10px;         /* you can make it slightly bigger */
  height: 10px;
  background-color: #ffab1d;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

.bs-stepper .content {
  display: none;
}

.bs-stepper .content.active {
  display: block;
}

.badge-status {
    font-size: 0.65rem !important;
    padding: 0.25em 0.5em !important;
    line-height: 1.2;
}

.disabled-card {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.form-check-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.35);
}

.current-user-row td:first-child {
  position: relative;
  border-left: 3px solid #FFAB1D;
}

/* Pointed arrow tip */
.current-user-row td:first-child::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  
  width: 0;
  height: 0;

  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #FFAB1D;
}

.current-user-row td {
  background-color: #171e28 !important;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* RIGHT SIDE BORDER */
.current-user-row td:last-child {
  position: relative;
  border-right: 3px solid #FFAB1D;
}

/* RIGHT SIDE ARROW TIP */
.current-user-row td:last-child::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);

  width: 0;
  height: 0;

  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #FFAB1D;
}

/* 5 columns layout */
.group-col {
  width: 20%;
}

/* Responsive fallback */
@media (max-width: 1200px) {
  .group-col {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .group-col {
    width: 100%;
  }
}

/* Desktop: keep compact layout */
.race-badge {
  min-width: 170px;
}

/* Mobile: one per row */
@media (max-width: 576px) {
  .race-badge {
    width: 100%;
    min-width: 0;
    display: block;
  }
}

/* Headers stay on one line */
.stats-table th {
  white-space: nowrap;
}

/* Driver name row only */
.stats-table td:first-child .fw-semibold {
  white-space: nowrap;
}