/**
 * @package     Joomla.Site
 * @subpackage  mod_padre_standings
 *
 * @copyright   Copyright (C) 2025 Custom Development. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/* Main module container */
.mod-padre-standings {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* Season header */
.mod-padre-standings .standings-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.mod-padre-standings .season-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.mod-padre-standings .season-description {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Group headers */
.mod-padre-standings .group-header {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.mod-padre-standings .group-title {
    color: #495057;
    font-weight: 600;
    margin: 0;
    font-size: 1.25rem;
}

/* Table wrapper */
.mod-padre-standings .standings-table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Standings table */
.mod-padre-standings .standings-table {
    margin-bottom: 0;
    background: #ffffff;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.mod-padre-standings .standings-table thead th {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mod-padre-standings .standings-table thead th:first-child {
    border-top-left-radius: 6px;
}

.mod-padre-standings .standings-table thead th:last-child {
    border-top-right-radius: 6px;
}

.mod-padre-standings .standings-table tbody td {
    padding: 0.875rem 0.75rem;
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
    font-size: 0.9rem;
}

.mod-padre-standings .standings-table tbody tr:hover {
    background-color: #f8f9fa;
}

.mod-padre-standings .standings-table tbody tr:nth-child(even) {
    background-color: rgba(0, 123, 255, 0.05);
}

.mod-padre-standings .standings-table tbody tr:nth-child(even):hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Column specific styling */
.mod-padre-standings .position-col {
    width: 60px;
    text-align: center;
}

.mod-padre-standings .position-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.85rem;
}

.mod-padre-standings .team-col {
    min-width: 200px;
    max-width: 300px;
}

.mod-padre-standings .team-info {
    display: flex;
    flex-direction: column;
}

.mod-padre-standings .team-name {
    font-weight: 600;
    color: #495057;
    line-height: 1.3;
}

.mod-padre-standings .team-city {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.mod-padre-standings .stat-col {
    width: 70px;
    font-weight: 500;
    font-size: 0.9rem;
}

.mod-padre-standings .points-col {
    width: 80px;
    font-weight: 700;
    font-size: 1rem;
    color: #007bff;
}

/* Stat value colors */
.mod-padre-standings .wins {
    color: #28a745;
}

.mod-padre-standings .losses {
    color: #dc3545;
}

.mod-padre-standings .draws {
    color: #ffc107;
}

.mod-padre-standings .positive {
    color: #28a745;
}

.mod-padre-standings .negative {
    color: #dc3545;
}

/* Compact mode */
.mod-padre-standings .standings-table.compact {
    font-size: 0.85rem;
}

.mod-padre-standings .standings-table.compact thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
}

.mod-padre-standings .standings-table.compact tbody td {
    padding: 0.625rem 0.5rem;
    font-size: 0.8rem;
}

.mod-padre-standings .standings-table.compact .team-info {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.mod-padre-standings .standings-table.compact .team-city {
    margin-top: 0;
}

.mod-padre-standings .standings-table.compact .position-number {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 0.75rem;
}

/* Standings note */
.mod-padre-standings .standings-note {
    text-align: center;
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
}

/* Responsive design */
@media (max-width: 768px) {
    .mod-padre-standings {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .mod-padre-standings .standings-table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .mod-padre-standings .standings-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .mod-padre-standings .team-col {
        min-width: 150px;
    }
    
    .mod-padre-standings .stat-col {
        width: 50px;
    }
    
    .mod-padre-standings .points-col {
        width: 60px;
    }
}

@media (max-width: 576px) {
    .mod-padre-standings .standings-table {
        font-size: 0.8rem;
    }
    
    .mod-padre-standings .team-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mod-padre-standings .team-city {
        font-size: 0.7rem;
    }
    
    .mod-padre-standings .position-number {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 0.7rem;
    }
}

/* Print styles */
@media print {
    .mod-padre-standings {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .mod-padre-standings .standings-table thead th {
        background: #f8f9fa !important;
        color: #000 !important;
        border: 1px solid #000;
    }
    
    .mod-padre-standings .standings-table tbody td {
        border: 1px solid #000;
    }
    
    .mod-padre-standings .standings-table tbody tr:nth-child(even) {
        background-color: #f8f9fa !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mod-padre-standings {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .mod-padre-standings .season-title,
    .mod-padre-standings .group-title {
        color: #e2e8f0;
    }
    
    .mod-padre-standings .group-header {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        border-left-color: #63b3ed;
    }
    
    .mod-padre-standings .standings-table {
        background: #2d3748;
    }
    
    .mod-padre-standings .standings-table tbody td {
        border-top-color: #4a5568;
    }
    
    .mod-padre-standings .standings-table tbody tr:hover {
        background-color: #4a5568;
    }
    
    .mod-padre-standings .standings-table tbody tr:nth-child(even) {
        background-color: rgba(99, 179, 237, 0.1);
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mod-padre-standings .standings-table-wrapper {
    animation: fadeIn 0.5s ease-out;
}