/* ratings.css - Custom styles for F1 Ratings */

/*
 * NOTE: Most styles are now handled via Tailwind CSS utility classes and the configuration in base.html.
 * This file contains specific component styles that are complex to represent solely with utilities
 * or are legacy styles waiting to be refactored.
 */

/* Rating bar styles */
.rating-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.rating-btn {
    min-width: 2rem;
    transition: all 0.15s ease;
}

.rating-btn:hover {
    transform: scale(1.1);
}

.rating-btn.btn-active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Make rating buttons more touch-friendly on mobile */
@media (max-width: 640px) {
    .rating-btn {
        min-width: 2.5rem;
        min-height: 2.5rem;
        font-size: 0.875rem;
    }
}

/* Chart containers */
#driver-radar-chart svg,
#team-bar-chart svg,
#distribution-chart svg,
#season-heatmap svg,
#driver-evolution-chart svg {
    overflow: visible;
}

/* Chart text colors */
#driver-radar-chart text,
#team-bar-chart text,
#distribution-chart text,
#driver-evolution-chart text {
    fill: hsl(var(--bc));
}

/* Heatmap cells */
#season-heatmap rect {
    transition: opacity 0.2s ease;
}

#season-heatmap rect:hover {
    opacity: 0.8;
    cursor: pointer;
}

/* Team colors - Helper classes for border accents */
.team-border-mercedes { border-left: 4px solid #00d2be; }
.team-border-redbull { border-left: 4px solid #0600ef; }
.team-border-ferrari { border-left: 4px solid #dc0000; }
.team-border-mclaren { border-left: 4px solid #ff8700; }
.team-border-aston { border-left: 4px solid #006f62; }
.team-border-alpine { border-left: 4px solid #0090ff; }
.team-border-williams { border-left: 4px solid #005aff; }
.team-border-racingbulls { border-left: 4px solid #6692ff; }
.team-border-sauber { border-left: 4px solid #52e252; }
.team-border-haas { border-left: 4px solid #ffffff; }

/* Stepper styles (Wizard) */
.stepper-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.stepper-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: hsl(var(--b3));
    z-index: 0;
    transform: translateY(-50%);
}

.step-item {
    position: relative;
    z-index: 1;
    background-color: hsl(var(--b2));
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid hsl(var(--b3));
    transition: all 0.3s ease;
}

.step-item.active {
    border-color: hsl(var(--p));
    color: hsl(var(--p));
    box-shadow: 0 0 0 4px hsla(var(--p), 0.2);
}

.step-item.completed {
    background-color: hsl(var(--p));
    border-color: hsl(var(--p));
    color: hsl(var(--pc));
}

.step-content {
    display: none;
    animation: slideInRight 0.3s ease-out;
}

.step-content.active {
    display: block;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Skeleton loader - simpler implementation */
.skeleton {
    background-color: hsl(var(--b3));
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print styles */
@media print {
    .navbar,
    #submit-container,
    #toast-container,
    .btn {
        display: none !important;
    }

    .card {
        break-inside: avoid;
    }
}
