/* Club Detail Page Specific Styles */

/* Page Hero */
.club-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.season-selector {
    padding: 8px 16px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
}

.season-selector:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Club Information Card */
.club-info-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 32px;
    margin: 40px 0;
}

.club-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    gap: 15px;
}

.detail-label {
    font-weight: 700;
    color: var(--secondary);
    min-width: 80px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--text);
}

.map-link, .club-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
}

.map-link:hover, .club-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Advertisement Container */
.ad-container {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
}

/* Teams Section */
.teams-section {
    margin: 40px 0;
}

/* Tab panel visibility */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.team-count {
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: 5px;
}

/* Ranking Card */
.ranking-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 30px;
}

.ranking-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.ranking-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 16px;
    background: var(--background);
    border-radius: 10px;
    transition: all 0.2s;
}

.ranking-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.points-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.points-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.points-label {
    font-weight: 700;
    color: var(--secondary);
}

.points-value.total {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary);
    background: var(--background);
    padding: 8px 16px;
    border-radius: 12px;
    border: 2px solid var(--primary);
}

.points-breakdown {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.breakdown-item {
    font-size: 0.9em;
    color: var(--text-light);
    background: var(--background);
    padding: 8px 12px;
    border-radius: 8px;
}

/* Alert Card */
.alert-card {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    color: #856404;
    text-align: center;
}

/* Teams Card */
.teams-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 30px;
}

.teams-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.update-info {
    font-size: 0.8em;
    color: var(--text-light);
    font-style: italic;
}

/* Teams Table */
.teams-table-container {
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.teams-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1.05em;
}

.teams-table thead tr {
    background: var(--table-header);
    color: var(--white);
}

.teams-table th {
    padding: 16px 20px;
    font-weight: 700;
    text-align: left;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

.teams-table .team-position-header,
.teams-table .team-matches-header {
    text-align: center;
}

.teams-table tbody tr {
    background: var(--white);
    transition: all 0.2s ease;
}

.teams-table tbody tr:nth-child(even) {
    background: var(--table-row-alt);
}

.teams-table tbody tr:hover {
    background: rgba(243, 146, 0, 0.25) !important;
}

.teams-table tbody tr:hover td {
    background: rgba(243, 146, 0, 0.25) !important;
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(243, 146, 0, 0.25);
}

.teams-table tbody tr:hover td a {
    color: var(--secondary) !important;
    font-weight: 700;
}

.teams-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.teams-table tbody tr:last-child td {
    border-bottom: none;
}

/* Team Name Cell */
.team-name-cell {
    min-width: 250px;
}

.team-name-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-name-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: color 0.2s;
}

.team-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border-radius: 4px;
    flex-shrink: 0;
}

.status-badge img {
    width: 16px;
    height: 16px;
}

/* Team Category Cell */
.team-category-cell {
    color: var(--text-dark);
    font-weight: 600;
    min-width: 150px;
}

/* Team Position Cell */
.team-position-cell {
    text-align: center;
    min-width: 120px;
}

.position-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--background);
    border: 2px solid var(--secondary);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.2s ease;
    min-width: 60px;
    justify-content: center;
}

.position-link:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Position styling by rank */
.position-link.position-first {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: var(--white);
    font-weight: 800;
}

.position-link.position-first:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: translateY(-2px);
}

.position-link.position-second {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    border-color: #C0C0C0;
    color: var(--white);
    font-weight: 800;
}

.position-link.position-second:hover {
    background: linear-gradient(135deg, #A0A0A0, #808080);
    transform: translateY(-2px);
}

.position-link.position-third {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    border-color: #CD7F32;
    color: var(--white);
    font-weight: 800;
}

.position-link.position-third:hover {
    background: linear-gradient(135deg, #B8860B, #996515);
    transform: translateY(-2px);
}

.position-link.position-top {
    background: linear-gradient(135deg, var(--primary), #FF8C00);
    border-color: var(--primary);
    color: var(--white);
}

.position-link.position-top:hover {
    background: linear-gradient(135deg, #FF8C00, #FF7F00);
}

.position-number {
    font-weight: 700;
}

.position-icon {
    font-size: 0.9em;
    margin-left: 2px;
}

/* Team Matches Cell */
.team-matches-cell {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9em;
    min-width: 120px;
}

.loading-matches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading-matches img {
    width: 20px;
}

.text-muted {
    color: var(--text-light);
    font-style: italic;
}

/* Hide mobile match info on desktop */
.mobile-match-info {
    display: none;
}

/* Distribution Card */
.distribution-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 30px;
}

.distribution-table {
    overflow-x: auto;
    margin-top: 20px;
}

.distribution-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.distribution-table th {
    background: var(--table-header);
    color: var(--white);
    padding: 15px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9em;
}

.distribution-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.distribution-table td.category-name {
    background: var(--background);
    font-weight: 700;
    color: var(--secondary);
    text-align: left;
}

.distribution-table tr:last-child td {
    border-bottom: none;
}

.distribution-table tr:hover {
    background: rgba(243, 146, 0, 0.25) !important;
}

.distribution-table tr:hover td {
    background: rgba(243, 146, 0, 0.25) !important;
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(243, 146, 0, 0.25);
}

/* No Teams Card */
.no-teams-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 60px 32px;
    text-align: center;
    color: var(--text-light);
}

.no-teams-icon {
    font-size: 3em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-teams-card h4 {
    color: var(--text-light);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .club-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .club-details {
        gap: 12px;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .ranking-links {
        gap: 8px;
    }
    
    .ranking-link {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .points-breakdown {
        flex-direction: column;
        gap: 10px;
    }
    
    .teams-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Mobile Table Adjustments */
    .teams-table-container {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .teams-table {
        font-size: 0.9em;
    }
    
    .teams-table th,
    .teams-table td {
        padding: 12px 8px;
    }
    
    /* Hide matches column on mobile */
    .team-matches-header,
    .team-matches-cell {
        display: none;
    }
    
    /* Adjust column widths for 3-column layout */
    .team-name-cell {
        width: 55%;
        min-width: 0;
    }
    
    .team-category-cell {
        width: 25%;
        font-size: 0.85em;
        min-width: 110px;
    }
    
    .team-position-cell {
        width: 20%;
        text-align: center;
        min-width: 0px;
    }
    
    .team-link {
        font-size: 0.95em !important;
        line-height: 1.3;
    }
    
    /* Simplified position link for mobile - remove special formatting */
    .position-link {
        background: transparent !important;
        border: 1px solid var(--text-light) !important;
        padding: 4px 6px !important;
        font-size: 0.85em !important;
        min-width: auto !important;
        color: var(--text-dark) !important;
        font-weight: 600 !important;
    }
    
    /* Remove all special position styling in mobile */
    .position-link.position-first,
    .position-link.position-second,
    .position-link.position-third,
    .position-link.position-top {
        background: transparent !important;
        border: 1px solid var(--text-light) !important;
        color: var(--text-dark) !important;
        font-weight: 600 !important;
    }
    
    .position-link:hover {
        background: var(--table-row-hover) !important;
        color: var(--text-dark) !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Hide position icons in mobile */
    .position-icon {
        display: none;
    }
    
    /* Mobile match display - shown below team info */
    .team-row {
        position: relative;
    }
    
    .mobile-match-info {
        display: block;
        position: absolute;
        top: 40px;
        left: 8px;
        right: 0;
        width: calc(100% - 24px);
        padding: 8px 12px;
        margin-top: 8px;
        background: var(--background);
        border-radius: 6px;
        font-size: 0.8em;
        color: var(--text-light);
        border-top: 1px solid #eee;
    }
    
    /* Hide the "Partidos:" label in mobile */
    .mobile-match-info .match-label {
        display: none;
    }
    
    /* Set top alignment for all table cells in mobile */
    .teams-table td {
        vertical-align: top;
    }
    
    /* Override team name content to include mobile match info */
    .team-name-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-bottom: 40px; /* Make room for mobile match info */
    }
    
    .team-name-content .team-name-main {
        display: flex;
        align-items: center;
        gap: 6px;
        width: 100%;
    }
    
    .distribution-table {
        font-size: 0.8em;
    }
    
    .distribution-table th,
    .distribution-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .club-info-card,
    .ranking-card,
    .teams-card,
    .distribution-card {
        padding: 20px;
    }
    
    .points-value.total {
        font-size: 1.5em;
        padding: 6px 12px;
    }
} 
