/* components/modals/MATCH-MODAL.CSS */

/* Modal Content Base */
.modal-content {
    max-width: 700px;
    padding: var(--modal-pad);
    background: white;
    border: 3px solid var(--dusty-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    transform-origin: center center;
}

#matchCenterModal.win  .modal-content,
#matchCenterModal:has(.result-icon.win)  .modal-content { border-color: var(--light-green)   !important; }
#matchCenterModal.draw .modal-content,
#matchCenterModal:has(.result-icon.draw) .modal-content { border-color: var(--golden-yellow) !important; }
#matchCenterModal.loss .modal-content,
#matchCenterModal:has(.result-icon.loss) .modal-content { border-color: var(--soft-coral)    !important; }

/* Match Title Container */
.match-title-container {
    position: relative;
    margin-bottom: var(--modal-pad);
    text-align: center;
}

.match-title-container::after {
    content: '';
    position: absolute;
    bottom: -0.70rem;
    left: 50%;
    width: 50px;
    height: 4px;
    background: var(--dusty-blue);
    border-radius: var(--radius-sm);
    transform: translateX(-50%);
}

#matchCenterModal.win  .match-title-container::after { background: var(--light-green)   !important; }
#matchCenterModal.draw .match-title-container::after { background: var(--golden-yellow) !important; }
#matchCenterModal.loss .match-title-container::after { background: var(--soft-coral)    !important; }

.team-name {
    font-weight: 800;
    font-size: var(--text-h3);
    line-height: 1.2;
    color: var(--dark-gray);
}

.home-team { margin-bottom: 0.10rem; }

.vs-text {
    margin-bottom: 0.10rem;
    font-weight: 600;
    font-size: var(--text-lg);
    color: var(--medium-gray);
}

.away-team { margin-bottom: 0.5rem; }

/* Season Label */
.season {
    margin: 0 0 var(--modal-pad);
    font-weight: 600;
    font-size: var(--text-lg);
    color: var(--medium-gray);
    text-align: center;
    text-transform: uppercase;
}

/* Match Sponsor */
.modal-sponsor-container {
    margin-bottom: var(--grid-gap);
    padding: 0.5rem;
    text-align: center;
}

.modal-sponsor-container h3 {
    position: relative;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--dark-gray);
    text-align: center;
}

.modal-sponsor-container h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 35px;
    height: 3px;
    background: var(--dusty-blue);
    border-radius: var(--radius-sm);
    transform: translateX(-50%);
}

#matchCenterModal.win  .modal-sponsor-container h3::after { background: var(--light-green)   !important; }
#matchCenterModal.draw .modal-sponsor-container h3::after { background: var(--golden-yellow) !important; }
#matchCenterModal.loss .modal-sponsor-container h3::after { background: var(--soft-coral)    !important; }

#modalSponsorLink {
    display: inline-block;
    border-radius: var(--radius-md);
}

#modalSponsorLogo {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 70px;
    border-radius: var(--radius-md);
}

/* Match Score */
.modal-match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 var(--modal-pad);
}

.score-display {
    min-width: 110px;
    padding: 0.625rem 1.125rem;
    background: white;
    border: 3px solid var(--dusty-blue);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-medium);
    font-weight: 700;
    font-size: var(--text-h3);
    color: var(--dark-gray);
    text-align: center;
}

#matchCenterModal.win  .score-display,
#matchCenterModal:has(.result-icon.win)  .score-display { border-color: var(--light-green)   !important; }
#matchCenterModal.draw .score-display,
#matchCenterModal:has(.result-icon.draw) .score-display { border-color: var(--golden-yellow) !important; }
#matchCenterModal.loss .score-display,
#matchCenterModal:has(.result-icon.loss) .score-display { border-color: var(--soft-coral)    !important; }

/* Goalscorers Section */
.goalscorers-section {
    margin-bottom: var(--modal-pad);
    padding: var(--card-pad);
    background: white;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
}

.goalscorers-section h3 {
    position: relative;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--dark-gray);
    text-align: center;
}

.goalscorers-section h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 35px;
    height: 3px;
    background: var(--dusty-blue);
    border-radius: var(--radius-sm);
    transform: translateX(-50%);
}

#matchCenterModal.win  .goalscorers-section h3::after { background: var(--light-green)   !important; }
#matchCenterModal.draw .goalscorers-section h3::after { background: var(--golden-yellow) !important; }
#matchCenterModal.loss .goalscorers-section h3::after { background: var(--soft-coral)    !important; }

.goalscorers-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-left: 0;
    list-style: none;
}

.goalscorer-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0.8rem;
    background: var(--nested-box);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    font-weight: 600;
    font-size: var(--text-body);
    line-height: 1.4;
    color: var(--dark-gray);
    text-align: center;
}

.goalscorer-item .fas.fa-futbol {
    margin-right: 8px;
    font-size: 1.1em;
    color: black;
}

/* Match Details (Date, Time, Stadium) */
.modal-details {
    display: flex;
    gap: var(--modal-pad);
    margin-bottom: var(--modal-pad);
}

.modal-section {
    flex: 1;
    margin: 0;
    padding: var(--card-pad);
    background: white;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
}

.modal-section h3 {
    position: relative;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--dark-gray);
    text-align: center;
}

.modal-section h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 35px;
    height: 3px;
    background: var(--dusty-blue);
    border-radius: var(--radius-sm);
    transform: translateX(-50%);
}

#matchCenterModal.win  .modal-section h3::after { background: var(--light-green)   !important; }
#matchCenterModal.draw .modal-section h3::after { background: var(--golden-yellow) !important; }
#matchCenterModal.loss .modal-section h3::after { background: var(--soft-coral)    !important; }

.date-time-container {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.date-box,
.time-box {
    flex: 1;
    text-align: center;
}

.date-box p,
.time-box p,
.stadium-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0.8rem;
    background: var(--nested-box);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    font-weight: 600;
    font-size: var(--text-body);
    line-height: 1.4;
    color: var(--dark-gray);
    text-align: center;
}

#stadiumName .fas.fa-map-marker-alt,
#matchDate .fas.fa-calendar,
#matchTime .fas.fa-clock {
    margin-right: 8px;
    font-size: 1.1em;
    color: var(--medium-gray);
}

/* Helpers */
#matchCenterModal .modal-content > *:last-child {
    margin-bottom: 0 !important;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .match-title-container::after {
        width: 40px;
        height: 3px;
    }

    .season {
        font-size: 0.9rem;
    }

    .score-display {
        min-width: 90px;
        padding: 0.4375rem 0.75rem;
    }

    .modal-section h3,
    .goalscorers-section h3,
    .modal-sponsor-container h3 {
        font-size: 1rem;
    }

    .modal-section h3::after,
    .goalscorers-section h3::after,
    .modal-sponsor-container h3::after {
        width: 30px;
    }

    .date-time-container {
        gap: 0.4rem;
    }

    .date-box, .time-box {
        flex: 1;
        min-width: 0;
    }

    .date-box p,
    .time-box p,
    .goalscorer-item,
    .stadium-name {
        padding: 0.6rem;
    }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
    .match-title-container::after {
        width: 35px;
    }

    .season {
        font-size: 0.85rem;
    }

    .score-display {
        min-width: 80px;
        padding: 0.375rem 0.625rem;
    }

    .modal-section h3,
    .goalscorers-section h3,
    .modal-sponsor-container h3 {
        font-size: 0.9rem;
    }

    .modal-section h3::after,
    .goalscorers-section h3::after,
    .modal-sponsor-container h3::after {
        width: 25px;
    }

    .modal-details {
        flex-direction: column;
    }

    .date-time-container {
        gap: 0.3rem;
    }

    .date-box p,
    .time-box p,
    .goalscorer-item,
    .stadium-name {
        padding: 0.5rem;
    }
}