/**
 * @package     Joomla.Site
 * @subpackage  mod_padre_team
 *
 * @copyright   Copyright (C) 2026 Custom Development. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/* ============================================
   Main Module Container
   ============================================ */
.mod-padre-team {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================
   Team Profile Header
   ============================================ */
.mod-padre-team .team-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 3px solid #e9ecef;
    margin-bottom: 2rem;
}

.mod-padre-team .tournament-logo-container {
    margin-bottom: 1.5rem;
}

.mod-padre-team .tournament-logo {
    max-height: 120px;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.mod-padre-team .team-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Team Picture */
.mod-padre-team .team-picture-container {
    height: 200px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 4px solid #007bff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mod-padre-team .team-picture-container:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.mod-padre-team .team-picture-container.no-picture {
    width: 200px;
    cursor: default;
}

.mod-padre-team .team-picture-container.no-picture:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.mod-padre-team .team-picture {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.mod-padre-team .team-emblem {
    object-fit: contain;
    padding: 1rem;
    background: #f8f9fa;
}

.mod-padre-team .no-picture-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
}

/* Team Info */
.mod-padre-team .team-info-container {
    text-align: center;
}

.mod-padre-team .team-name {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.mod-padre-team .team-city {
    font-weight: 400;
    color: #6c757d;
    font-size: 1.5rem;
}

.mod-padre-team .team-nickname {
    font-size: 1.25rem;
    color: #007bff;
    font-weight: 600;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.mod-padre-team .team-nickname i {
    margin-right: 0.5rem;
}

.mod-padre-team .team-colors {
    font-size: 1rem;
    color: #495057;
}

.mod-padre-team .team-colors i {
    margin-right: 0.5rem;
    color: #007bff;
}

/* ============================================
   Section Styles
   ============================================ */
.mod-padre-team .team-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.mod-padre-team .section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #007bff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mod-padre-team .section-title i {
    color: #007bff;
}

/* ============================================
   Coaches Section
   ============================================ */
.mod-padre-team .coaches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.mod-padre-team .coach-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #dee2e6;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mod-padre-team .coach-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mod-padre-team .coach-card.head-coach {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
}

.mod-padre-team .coach-card.assistant-coach {
    border-left: 4px solid #17a2b8;
}

.mod-padre-team .coach-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.mod-padre-team .coach-card.head-coach .coach-badge {
    color: #856404;
}

.mod-padre-team .coach-card.assistant-coach .coach-badge {
    color: #0c5460;
}

.mod-padre-team .coach-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

/* ============================================
   Roster Section
   ============================================ */
.mod-padre-team .roster-table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.mod-padre-team .roster-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mod-padre-team .roster-table thead {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
}

.mod-padre-team .roster-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mod-padre-team .roster-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

.mod-padre-team .roster-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.mod-padre-team .roster-table tbody tr:hover {
    background: #e7f1ff;
}

.mod-padre-team .roster-table tbody tr:last-child td {
    border-bottom: none;
}

.mod-padre-team .player-name {
    font-weight: 600;
    color: #212529;
}

.mod-padre-team .player-nickname {
    font-style: italic;
    color: #6c757d;
    font-weight: 400;
    margin-left: 0.5rem;
}

.mod-padre-team .player-position {
    color: #495057;
}

.mod-padre-team .player-name-col {
    width: 60%;
}

.mod-padre-team .player-position-col {
    width: 40%;
}

.mod-padre-team .roster-count {
    text-align: right;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

/* ============================================
   Schedule Section
   ============================================ */
.mod-padre-team .schedule-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mod-padre-team .game-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #dee2e6;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.75rem 1.5rem;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mod-padre-team .game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Game Status Variations */
.mod-padre-team .game-card.upcoming {
    border-left: 4px solid #17a2b8;
}

.mod-padre-team .game-card.played {
    border-left: 4px solid #6c757d;
}

.mod-padre-team .game-card.win {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
}

.mod-padre-team .game-card.loss {
    border-left: 4px solid #dc3545;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
}

.mod-padre-team .game-card.tie {
    border-left: 4px solid #ffc107;
}

/* Game Date/Time */
.mod-padre-team .game-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #495057;
    min-width: 110px;
}

.mod-padre-team .game-datetime i {
    width: 16px;
    margin-right: 0.5rem;
    color: #6c757d;
}

.mod-padre-team .game-date {
    font-weight: 600;
}

/* Game Matchday */
.mod-padre-team .game-matchday {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #dee2e6;
}

/* Game Details */
.mod-padre-team .game-details {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.mod-padre-team .game-opponent {
    flex: 1;
}

.mod-padre-team .vs-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-right: 0.5rem;
}

.mod-padre-team .opponent-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

/* Conditional Opponent (Bracket Play) */
.mod-padre-team .conditional-opponent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid #ffc107;
    font-style: italic;
}

.mod-padre-team .conditional-opponent.winner {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #28a745;
}

.mod-padre-team .conditional-opponent.winner i {
    color: #28a745;
}

.mod-padre-team .conditional-opponent.loser {
    background: linear-gradient(135deg, #fbe9e7 0%, #ffccbc 100%);
    border-color: #ff5722;
}

.mod-padre-team .conditional-opponent.loser i {
    color: #ff5722;
}

/* Game Score */
.mod-padre-team .game-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.mod-padre-team .team-score {
    color: #007bff;
}

.mod-padre-team .team-score.winner {
    color: #28a745;
}

.mod-padre-team .score-separator {
    color: #6c757d;
    font-weight: 400;
}

.mod-padre-team .opponent-score {
    color: #dc3545;
}

.mod-padre-team .opponent-score.winner {
    color: #28a745;
}

.mod-padre-team .overtime-indicator {
    font-size: 0.7rem;
    font-weight: 600;
    background: #6c757d;
    color: #ffffff;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Result Badges */
.mod-padre-team .game-result-badge,
.mod-padre-team .game-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
}

.mod-padre-team .game-result-badge.result-win {
    background: #d4edda;
    color: #155724;
}

.mod-padre-team .game-result-badge.result-loss {
    background: #f8d7da;
    color: #721c24;
}

.mod-padre-team .game-result-badge.result-tie {
    background: #fff3cd;
    color: #856404;
}

.mod-padre-team .game-status-badge {
    background: #d1ecf1;
    color: #0c5460;
}

/* Game Location */
.mod-padre-team .game-location {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    color: #6c757d;
    padding-top: 0.5rem;
    border-top: 1px dashed #dee2e6;
}

.mod-padre-team .game-location i {
    margin-right: 0.5rem;
    color: #007bff;
}

/* ============================================
   Previous Seasons Section
   ============================================ */
.mod-padre-team .previous-seasons-section {
    background: #f0f4f8;
    border: 1px solid #d0d7de;
}

.mod-padre-team .previous-season-group {
    margin-bottom: 1.5rem;
}

.mod-padre-team .previous-season-group:last-child {
    margin-bottom: 0;
}

.mod-padre-team .previous-season-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin: 0 0 1rem 0;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-left: 3px solid #6c757d;
    border-radius: 4px;
}

.mod-padre-team .previous-games-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mod-padre-team .previous-games-container .game-card {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.mod-padre-team .previous-games-container .game-card.previous-game {
    background: #ffffff;
    border: 1px solid #dee2e6;
    opacity: 0.95;
}

.mod-padre-team .previous-games-container .game-datetime {
    min-width: 90px;
}

.mod-padre-team .previous-games-container .game-date {
    font-size: 0.85rem;
}

.mod-padre-team .previous-games-container .game-score {
    font-size: 1.2rem;
}

.mod-padre-team .previous-games-container .opponent-name {
    font-size: 1rem;
}

/* ============================================
   Alerts
   ============================================ */
.mod-padre-team .alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: none;
}

.mod-padre-team .alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.mod-padre-team .alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.mod-padre-team .alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (min-width: 768px) {
    .mod-padre-team .team-header-content {
        flex-direction: row;
        text-align: left;
    }
    
    .mod-padre-team .team-info-container {
        text-align: left;
    }
    
    .mod-padre-team .team-picture-container {
        flex-shrink: 0;
    }
    
    .mod-padre-team .game-card {
        grid-template-columns: 120px 1fr auto;
    }
    
    .mod-padre-team .game-matchday {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .mod-padre-team {
        padding: 1.25rem;
    }
    
    .mod-padre-team .team-name {
        font-size: 1.5rem;
    }
    
    .mod-padre-team .team-city {
        font-size: 1.2rem;
        display: block;
        margin-top: 0.25rem;
    }
    
    .mod-padre-team .team-picture-container {
        width: 150px;
        height: 150px;
    }
    
    .mod-padre-team .game-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .mod-padre-team .game-datetime {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .mod-padre-team .game-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .mod-padre-team .coach-card {
        min-width: 100%;
    }
    
    .mod-padre-team .roster-table th,
    .mod-padre-team .roster-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .mod-padre-team .tournament-logo {
        max-height: 80px;
        max-width: 150px;
    }
    
    .mod-padre-team .section-title {
        font-size: 1.2rem;
    }
    
    .mod-padre-team .game-score {
        font-size: 1.25rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .mod-padre-team {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .mod-padre-team .game-card:hover,
    .mod-padre-team .coach-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ============================================
   Team Picture Lightbox Modal
   ============================================ */
.mod-padre-team .team-picture-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.mod-padre-team .team-picture-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mod-padre-team .modal-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: visible;
}

.mod-padre-team .modal-picture {
    max-height: calc(100vh - 120px);
    max-width: calc(100vw - 40px);
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-shrink: 1;
}

.mod-padre-team .modal-caption {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    flex-shrink: 0;
}

.mod-padre-team .modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10000;
    line-height: 1;
}

.mod-padre-team .modal-close:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mod-padre-team .team-picture-modal.active {
        padding: 15px;
    }
    
    .mod-padre-team .modal-content-wrapper {
        max-width: calc(100vw - 30px);
        max-height: calc(100vh - 30px);
    }
    
    .mod-padre-team .modal-picture {
        max-height: calc(100vh - 100px);
        max-width: calc(100vw - 30px);
    }
    
    .mod-padre-team .modal-caption {
        font-size: 1rem;
        margin-top: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .mod-padre-team .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}
