/* CSS Responsivo para Guest Views */

/* Tournament Show Responsive Improvements */

/* Tabs */
@media (max-width: 640px) {
    
    #subtournament-tab{
        display: block;
    }
}

/* Standings Table Responsive */
.standings-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.standings-row {
    min-width: 400px; /* Minimum width to prevent crushing */
}

@media (max-width: 640px) {
    .standings-header,
    .standings-row {
        font-size: 0.75rem; /* 12px */
    }
    .substandings-container{
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stan-table{
    display: table;
}
    .standings-team-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .standings-position {
        width: 1.5rem !important;
        height: 1.5rem !important;
        font-size: 0.75rem;
    }
    
    .standings-logo {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
}

/* Matchday Cards Responsive */
.matchday-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    
}

@media (max-width: 767px) {
    .matchday-grid {
        place-items: center;
        grid-template-columns: 1fr;
    }
    .submatchday-grid {
        width: 80%;
    }
    .local-team-matchday{
        display: block;
        justify-items: center;
        text-align: center;
    }
    .visit-team-matchday{
        display: flex;
        justify-content: center;
        text-align: center;
        flex-wrap: wrap-reverse;

    }
    .more-info {
        display: none;
    }
}

@media (min-width: 768px) {
    
    .matchday-grid {
        grid-template-columns: repeat(2, 1fr);
        
    }
}


/* Game Cards Responsive */

@media (max-width: 640px) {
    .game-card {
        padding: 0.75rem;
    }
    
    .game-team-name {
        font-size: 0.75rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .game-logo {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    .game-score {
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Tab Navigation Responsive */


@media (max-width: 640px) {
    .tab-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .tab-nav button {
        width: 100%;
    }
}

/* Subtournament Cards Responsive */

@media (max-width: 640px) {
    .subtournament-header {
        padding: 1rem;
    }
    
    .subtournament-title {
        font-size: 1rem;
    }
}

/* Following Badges Responsive */


@media (max-width: 640px) {
    .following-badges {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .following-badge {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
        background-color: rgba(249, 250, 251, 0.5);
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .following-badge .badge-name {
        font-size: 0.75rem;
        text-align: center;
    }
    
    .following-badge .unfollow-button {
        font-size: 0.75rem;
        text-align: center;
        padding: 0.25rem;
    }
}

/* Tournament Info Responsive */


@media (max-width: 640px) {
    .tournament-info .tournament-title {
        font-size: 1.25rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .tournament-info .tournament-date {
        justify-content: center;
        font-size: 0.75rem;
    }
    
    .tournament-info .tournament-description {
        text-align: center;
        font-size: 0.875rem;
    }
    
    .tournament-info .tournament-categories {
        justify-content: center;
    }
}



/* Scrollable containers */
.horizontal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 4px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark mode scrollbar */
.dark .horizontal-scroll::-webkit-scrollbar-track {
    background: #374151;
}

.dark .horizontal-scroll::-webkit-scrollbar-thumb {
    background: #6b7280;
}

.dark .horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}