/* F1 Quiniela Custom Styles */

.f1-floating-clock {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid #e10600;
    padding: 10px 18px;
    border-radius: 8px;
    z-index: 1050;
    min-width: 140px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

.f1-floating-clock:hover {
    transform: translateY(-5px);
    background: rgba(20, 20, 20, 0.95);
}

.f1-live-indicator {
    font-size: 9px;
    font-weight: 900;
    color: #e10600;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.f1-live-indicator .dot {
    height: 6px;
    width: 6px;
    background-color: #e10600;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: f1-clock-blink 1.2s infinite;
}

@keyframes f1-clock-blink {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

.clock-text {
    color: white;
    font-size: 20px;
    line-height: 1;
    margin: 2px 0;
}

.date-text {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: bold;
}

/* SCORES & RANKING STYLES */
.tab-panel { transition: opacity 0.3s ease; }

.f1-position-indicator {
    width: 24px; text-align: center;
}
tr[data-position="1"] .score-bar { background: linear-gradient(90deg,#FFD700,#FFA500) !important; }
tr[data-position="2"] .score-bar { background: linear-gradient(90deg,#C0C0C0,#A0A0A0) !important; }
tr[data-position="3"] .score-bar { background: linear-gradient(90deg,#CD7F32,#A0522D) !important; }

/* TELEMETRY LOADER STYLES (Sectorized) */
.telemetry-loader {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: flex-start; /* Aligned to top */
    justify-content: center;
    padding-top: 150px; /* Fixed distance from top for visibility */
    transition: opacity 0.4s ease;
    border-radius: inherit;
}
@media (max-width: 991px) {
    .telemetry-loader {
        padding-top: 100px;
    }
}
.telemetry-loader.fade-out { opacity: 0; pointer-events: none; }

.loader-content {
    width: 100%;
    max-width: 300px;
    padding: 20px;
}

/* The "Pista" - Loading Track */
.f1-track-container {
    position: relative;
    width: 100%;
    height: 60px;
    background: #1a1a1a;
    border-radius: 4px;
    border-bottom: 2px solid #333;
    overflow: hidden;
    margin-bottom: 15px;
}

.f1-track-line {
    position: absolute;
    top: 50%; width: 100%; height: 2px;
    background: repeating-linear-gradient(90deg, #555, #555 10px, transparent 10px, transparent 20px);
    transform: translateY(-50%);
}

/* The F1 Car Moving */
.f1-car-loader {
    position: absolute;
    top: 50%;
    left: -120px;
    width: 120px;
    height: 50px;
    background-image: var(--car-url, url('../img/f1-car-loader.png'));
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* scaleX(-1) flips car to face left → correct forward direction on track */
    transform: translateY(-50%) scaleX(-1);
    animation: f1-race 7s linear infinite;
    /* No color filters — image renders as-is */
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}

@keyframes f1-race {
    0%   { left: -120px; }
    100% { left: 100%; }
}

.pulsing-telemetry {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e10600;
    text-shadow: 0 0 10px rgba(225, 6, 0, 0.3);
    animation: telemetry-pulse 1s ease-in-out infinite alternate;
}

@keyframes telemetry-pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Loading Dots Sequential Animation */
.loading-dots span {
    animation: f1-dot-blink 1.4s infinite both;
    font-size: 1.2rem;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes f1-dot-blink {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

@media (max-width: 576px) {
    .h1-mobile-adjust {
        font-size: 2.2rem !important;
    }
}

/* TOM SELECT - F1 DARK THEME */
.ts-wrapper.f1-select-search .ts-control {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 0 !important;
    padding: 0.6rem 1rem !important;
}
.ts-wrapper.single .ts-control {
    background-image: none !important;
}
.ts-dropdown {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    z-index: 2000 !important;
}
.ts-dropdown .option {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 8px 12px !important;
}
.ts-dropdown .active {
    background-color: #e10600 !important;
    color: white !important;
}
.ts-wrapper.f1-select-search .ts-control input {
    color: white !important;
}
.ts-wrapper.f1-select-search.focus .ts-control {
    box-shadow: 0 0 0 2px rgba(225, 6, 0, 0.2) !important;
    border-color: #e10600 !important;
}
.ts-wrapper.f1-select-search .ts-control input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}
/* For Tom Select specifically */
.ts-wrapper.f1-select-search .ts-control .item, 
.ts-wrapper.f1-select-search .ts-control input {
    font-size: 0.9rem !important;
}
.ts-wrapper.f1-select-search .ts-dropdown .option.active {
    background-color: #e10600 !important;
}
