/* Best Bats Page Specific Fixes */

/* Force 2x2 grid for performance dashboard on desktop */
@media (min-width: 769px) {
    .performance-dashboard .metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }
}

/* Fix carousel card structure and rank badge */
.quick-top-three-card {
    position: relative !important;
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 1rem !important;
    transition: all 0.3s ease !important;
    overflow: visible !important;
}

/* Fix rank badge to be small and positioned correctly */
.quick-top-three-card .card-rank-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: auto !important;
    height: auto !important;
    padding: 0.25rem 0.75rem !important;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important;
    color: white !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    z-index: 10 !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Ensure proper z-index stacking */
.quick-top-three-card h5 {
    position: relative !important;
    z-index: 1 !important;
    padding-right: 5rem !important;
    margin: 0 0 0.75rem 0 !important;
}

.quick-top-three-card .image-wrapper {
    position: relative !important;
    z-index: 1 !important;
    margin-bottom: 0.75rem !important;
}

/* Position bat grade and score correctly */
.quick-top-three-card .bat-grade {
    position: absolute !important;
    bottom: 8px !important;
    left: 8px !important;
    background: #fff !important;
    border: 2px solid #333 !important;
    color: #333 !important;
    font-weight: 700 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.875rem !important;
    z-index: 10 !important;
    width: auto !important;
    height: auto !important;
}

.quick-top-three-card .bat-score {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    font-weight: 600 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    z-index: 10 !important;
    width: auto !important;
    height: auto !important;
}

/* Fix carousel container layout */
.quick-top-three-container {
    display: flex !important;
    gap: 1rem !important;
    padding: 1rem !important;
    align-items: stretch !important;
}

/* Ensure slider is scrollable */
.quick-top-three-slider {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    padding: 1rem 0 !important;
}

/* Hide scrollbar but keep functionality */
.quick-top-three-slider::-webkit-scrollbar {
    height: 6px;
}

.quick-top-three-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.quick-top-three-slider::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.quick-top-three-slider::-webkit-scrollbar-thumb:hover {
    background: #555;
}