/**
 * @package     Joomla.Site
 * @subpackage  mod_padre_games
 *
 * @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-games {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* Alert messages */
.mod-padre-games .alert {
    margin: 0;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid;
}

.mod-padre-games .alert-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
    color: #856404;
}

.mod-padre-games .alert-danger {
    border-left-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}

.mod-padre-games .alert-info {
    border-left-color: #17a2b8;
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Games container - two column layout */
.mod-padre-games .games-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Single column when only one type of games */
.mod-padre-games .games-container:has(.games-column:only-child) {
    grid-template-columns: 1fr;
}

/* Games columns */
.mod-padre-games .games-column {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    min-height: 200px;
}

.mod-padre-games .past-games {
    border-top: 4px solid #28a745;
}

.mod-padre-games .upcoming-games {
    border-top: 4px solid #007bff;
}

/* Column header */
.mod-padre-games .column-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #dee2e6;
}

.mod-padre-games .column-title {
    color: #495057;
    font-weight: 600;
    margin: 0;
    font-size: 1.2rem;
}

/* Games list */
.mod-padre-games .games-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Game item */
.mod-padre-games .game-item {
    background: #ffffff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mod-padre-games .game-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Game teams section */
.mod-padre-games .game-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.mod-padre-games .team {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 4px;
    background: #f8f9fa;
}

.mod-padre-games .team.winner {
    background: #d4edda;
    font-weight: 600;
}

.mod-padre-games .team-name {
    flex: 1;
    font-size: 0.95rem;
    color: #495057;
}

.mod-padre-games .team-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: #28a745;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #ffffff;
    border-radius: 4px;
    min-width: 35px;
    text-align: center;
}

.mod-padre-games .vs-separator {
    flex-shrink: 0;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 0 0.5rem;
}

/* Game meta information */
.mod-padre-games .game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

.mod-padre-games .game-meta > div {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mod-padre-games .game-date {
    font-weight: 600;
}

.mod-padre-games .game-time {
    padding-left: 0.5rem;
    border-left: 1px solid #dee2e6;
}

.mod-padre-games .game-location {
    padding-left: 0.5rem;
    border-left: 1px solid #dee2e6;
}

.mod-padre-games .game-description {
    width: 100%;
    font-style: italic;
    color: #495057;
    padding-top: 0.25rem;
}

/* Icons */
.mod-padre-games .icon-location::before {
    content: "📍";
    margin-right: 0.25rem;
}

/* Responsive design */
@media (max-width: 992px) {
    .mod-padre-games .games-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mod-padre-games {
        padding: 1rem;
    }
    
    .mod-padre-games .games-column {
        padding: 0.75rem;
    }
    
    .mod-padre-games .game-item {
        padding: 0.75rem;
    }
    
    .mod-padre-games .game-teams {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mod-padre-games .vs-separator {
        padding: 0.25rem 0;
    }
    
    .mod-padre-games .team {
        width: 100%;
    }
    
    .mod-padre-games .game-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .mod-padre-games .game-time,
    .mod-padre-games .game-location {
        border-left: none;
        padding-left: 0;
    }
}

/* Print styles */
@media print {
    .mod-padre-games {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .mod-padre-games .game-item {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .mod-padre-games {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .mod-padre-games .games-column {
        background: #1a202c;
    }
    
    .mod-padre-games .column-title {
        color: #e2e8f0;
    }
    
    .mod-padre-games .game-item {
        background: #4a5568;
    }
    
    .mod-padre-games .team {
        background: #2d3748;
    }
    
    .mod-padre-games .team.winner {
        background: #2f855a;
    }
    
    .mod-padre-games .team-name {
        color: #e2e8f0;
    }
    
    .mod-padre-games .team-score {
        background: #2d3748;
    }
    
    .mod-padre-games .vs-separator {
        color: #a0aec0;
    }
    
    .mod-padre-games .game-meta {
        color: #a0aec0;
        border-top-color: #4a5568;
    }
    
    .mod-padre-games .game-description {
        color: #cbd5e0;
    }
}
