/* Match Page Styles */

/* Main Match Container */
.match-container {
    background: #fff;
    border-radius: 8px;
    margin: 2em auto;
    max-width: 1000px;
}

/* Match Header */
.match-header {
    display: flex;
    align-items: center;
}

.match-header h1 {
    position: absolute;
    top: -19px;
    left: 50%;
    background-color: #fff;
    padding: 0 15px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-weight: normal;
    z-index: 1;
}

/* Scoreline Styles (copied from style.css .full li.scoreline) */
.match-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.match-container li {
    padding: 5px 0;
}

.match-container li.scoreline {
    padding: 0;
    font-size: 2.5em;
    text-align: center;
}

.match-container li.scoreline-extra {
    padding: 0;
    font-size: 1.8em;
    text-align: center;
}

.match-container li.scoreline-type {
    padding: 15px 0 5px 0;
    font-size: 1.2em;
    text-align: center;
}

.match-container li.scoreline-type a {
    background: white;
    color: #1a3a6b;
    padding: 0.5em 1.5em;
    border-radius: 25px;
    border: 2px solid #1a3a6b;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.match-container li.scoreline-type a:hover {
    background: #1a3a6b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.match-container li.scoreline-venue {
    padding: 0;
    font-size: 1.2em;
    text-align: center;
}

.match-container li.scoreline-venue a {
    background: #f8fafd;
    color: #666;
    padding: 0.4em 1.2em;
    border-radius: 20px;
    border: 1px solid #e0e5ea;
    text-decoration: none;
    display: inline-block;
    font-style: italic;
    transition: all 0.3s ease;
}

.match-container li.scoreline-venue a:hover {
    background: white;
    color: #1a3a6b;
    border-color: #d7dadc;
}

.match-container li.center {
    text-align: center;
}

.match-info {
    display: flex;
    justify-content: center;
    gap: 2em;
    margin-top: 1em;
    flex-wrap: wrap;
}

.match-info .competition,
.match-info .venue {
    background: #f8fafd;
    padding: 0.5em 1em;
    border-radius: 20px;
    border: 1px solid #e0e5ea;
}

.match-info a {
    color: #1a3a6b;
    text-decoration: none;
    font-weight: 500;
}

.match-info a:hover {
    color: #b00;
    text-decoration: underline;
}

/* Scoreline Section */
.match-scoreline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2em 0;
    padding: 1.5em;
    background: linear-gradient(135deg, #f8fafd 0%, #e9eef6 100%);
    border-radius: 12px;
    border: 1px solid #d7dadc;
}

.team-section {
    flex: 1;
    text-align: center;
}

.team-section.home {
    text-align: left;
}

.team-section.away {
    text-align: right;
}

.score-section {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 2em;
}

.score-display {
    font-size: 2.5em;
    font-weight: bold;
    color: #1a3a6b;
    margin: 0;
}

/* Team Details */
.team-details {
    display: flex;
    margin: 2em 0;
}

.team-column {
    flex: 1;
    background: #fff;
    padding: 1.5em;
    border-top: 1px solid #e0e5ea;
    border-bottom: 1px solid #e0e5ea;
}

.team-column.home {
    margin-right: 0;
    border-right: 0.5px solid #e0e5ea;
}

.team-column.away {
    margin-left: 0;
    border-left: 0.5px solid #e0e5ea;
}

/* Goals Lists */
.goals-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2em 0;
    border-bottom: 2px solid #e0e5ea;
    padding-bottom: 2em;
}

.goals-list li {
    padding: 0.3em 0;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.goals-list li:last-child {
    padding-bottom: 1.5em;
}

.goals-list li:hover {
    background-color: #f8fafd;
    padding-left: 0.5em;
    padding-right: 0.5em;
    margin-left: -0.5em;
    margin-right: -0.5em;
    border-radius: 4px;
    border-bottom: 1px solid #e0e5ea;
}

.goals-list li:last-child {
    border-bottom: none;
}

.goals-list li:last-child:hover {
    border-bottom: none;
}

/* Style dummy goal elements to be invisible but maintain space */
.goals-list li.dummy {
    visibility: hidden;
    padding: 0.3em 0;
    border-bottom: 1px solid transparent;
    cursor: default;
}

.goals-list li.dummy:hover {
    background-color: transparent;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
}

.goals-list li.dummy:last-child {
    padding: 0.3em 0 1.5em 0; /* Override to match the last child padding for level dividers */
}

.goals-list .ball-icon {
    min-width: 2em;
    text-align: right;
    margin-right: 1em;
}

.goals-list .goal-player {
    flex: 1;
    text-align: left;
}

.goal-time {
    color: #666;
    font-size: 0.9em;
    margin-left: 0.5em;
}

/* Players Lists */
.players-list {
    list-style: none;
    padding: 0;
    margin: 2em 0 0 0;
}

.players-list li {
    padding: 0.4em 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.players-list li:hover {
    background-color: #f8fafd;
    padding-left: 0.5em;
    padding-right: 0.5em;
    margin-left: -0.5em;
    margin-right: -0.5em;
    border-radius: 4px;
    border-bottom: 1px solid #e0e5ea;
}

.players-list li:last-child {
    border-bottom: none;
}

.players-list li:last-child:hover {
    border-bottom: none;
}

.players-list .num {
    color: #666;
    font-size: 0.9em;
    min-width: 2em;
    text-align: right;
}

.players-list .player {
    flex: 1;
    margin: 0 1em;
    text-align: left;
}

.players-list .info {
    color: #888;
    font-size: 0.85em;
    text-align: right;
    min-width: 4em;
}

/* Formation Section */
.formation-section {
    margin: 2em 0;
    background: #f8fafd;
    padding: 1.5em;
    border-top: 1px solid #e0e5ea;
    border-bottom: 1px solid #e0e5ea;
}

.formation-section h2 {
    color: #1a3a6b;
    margin: 0 0 1em 0;
    font-size: 1.3em;
    border-bottom: 1px solid #d7dadc;
    padding-bottom: 0.5em;
}

.formation-grid {
    list-style: none;
    padding: 0;
    margin: 1em 0 0 0;
}

.formation-grid li {
    padding: 0.5em 0;
    line-height: 1.6;
}

/* Notes Section */
.match-notes {
    margin: 2em 0;
    background: #fff;
    padding: 1.5em 1.5em 0;
    border-top: 1px solid #e0e5ea;
    border-bottom: 1px solid #e0e5ea;
}

.match-notes h2 {
    color: #1a3a6b;
    margin: 0;
    font-size: 1.3em;
    border-bottom: 1px solid #d7dadc;
    padding-bottom: 0.5em;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-list li {
    padding: 0.4em 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.6;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notes-list li:hover {
    background-color: #f8fafd;
    padding-left: 0.5em;
    padding-right: 0.5em;
    margin-left: -0.5em;
    margin-right: -0.5em;
    border-radius: 4px;
    border-bottom: 1px solid #e0e5ea;
}

.notes-list li:last-child {
    border-bottom: none;
}

.notes-list li:last-child:hover {
    border-bottom: none;
}

.notes-list .strong {
    font-weight: bold;
    margin-right: 1em;
}

.notes-list .text {
    color: #666;
}

/* Sources Section */
.match-sources {
    margin: 2em 0;
    background: #f8fafd;
    padding: 1.5em;
    border-top: 1px solid #e0e5ea;
    border-bottom: 1px solid #e0e5ea;
}

.match-sources h2 {
    color: #1a3a6b;
    margin: 0 0 1em 0;
    font-size: 1.3em;
    border-bottom: 1px solid #d7dadc;
    padding-bottom: 0.5em;
}

.sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sources-list li {
    padding: 0.3em 0;
    border-bottom: 1px solid #f0f0f0;
}

.sources-list li:last-child {
    border-bottom: none;
}

.sources-list .strong {
    font-weight: bold;
    color: #1a3a6b;
    margin-right: 1em;
}

.sources-list .strong a {
    color: inherit;
    text-decoration: none;
}

.sources-list .strong a:hover {
    text-decoration: underline;
}

.sources-list .text {
    color: #555;
}

.sources-list a {
    color: #1a3a6b;
    text-decoration: none;
}

.sources-list a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1105px) {
    .match-container li.scoreline {
        font-size: 2em;
    }
    
    /* Match-specific adjustments for tablet */
    .goals-list li, .players-list li {
        padding: 0.4em 0;
    }
    
    .notes-list, .sources-list {
        padding: 0.8em;
    }
}

@media (max-width: 768px) {
    .match-container {
        margin: 1em;
        padding: 1em;
    }
    
    .match-scoreline {
        flex-direction: column;
        gap: 1em;
    }
    
    .team-details {
        flex-direction: column;
        gap: 1em;
    }
    
    .match-info {
        flex-direction: column;
        gap: 0.5em;
    }
    
    .score-display {
        font-size: 2em;
    }
    
    /* Team columns mobile adjustments */
    .team-column {
        margin-bottom: 1em;
    }
    
    .team-column.home,
    .team-column.away {
        border-left: none;
        border-right: none;
        border-top: 2px solid #e8ecf1;
        border-bottom: 2px solid #e8ecf1;
    }
}

@media (max-width: 700px) {
    /* Match page specific mobile styles */
    .goals-list li, .players-list li {
        padding: 0.3em 0;
        font-size: 0.9em;
    }
    
    .notes-list li, .sources-list li {
        padding: 0.4em 0;
        font-size: 0.9em;
    }
    
    .notes-list, .sources-list {
        padding: 0.6em;
    }
}

@media (max-width: 550px) {
    .match-container li.scoreline {
        font-size: 1.5em;
    }
    
    /* Small mobile adjustments */
    .goals-list li, .players-list li {
        padding: 0.2em 0;
        font-size: 0.85em;
    }
    
    .notes-list li, .sources-list li {
        padding: 0.3em 0;
        font-size: 0.85em;
    }
    
    .team-column {
        padding: 0.5em;
    }

    .team-details {
        flex-direction: row !important;
        gap: 1em !important;
    }
    
    /* Ensure goals and players lists are readable on small screens */
    .goals-list .num, .players-list .num {
        width: 10%;
        font-size: 0.8em;
    }
    
    .goals-list .player, .players-list .player {
        width: 75%;
        font-size: 0.85em;
    }
    
    .goals-list .info, .players-list .info {
        width: 15%;
        font-size: 0.75em;
    }
}

@media (max-width: 375px) {
    /* Extra small mobile devices */
    .goals-list .num, .players-list .num {
        width: 12%;
    }
    
    .goals-list .player, .players-list .player {
        width: 70%;
    }
    
    .goals-list .info, .players-list .info {
        width: 18%;
    }
}

@media (max-width: 280px) {
    /* Very small devices */
    .match-container {
        margin: 0.5em;
        padding: 0.5em;
    }
    
    .goals-list li, .players-list li {
        font-size: 0.8em;
    }
    
    .notes-list li, .sources-list li {
        font-size: 0.8em;
    }
}

/* Center utility class */
.center {
    text-align: center;
}

/* Hide/Show classes for responsive display */
.hide {
    display: none;
}

@media (max-width: 768px) {
    .show {
        display: none;
    }
    
    .hide {
        display: block;
    }
}

/* Responsive font size for match header title */
@media (max-width: 550px) {
    .match-header h1 {
        font-size: 1.2em !important;
        padding: 0 8px !important;
        top: -10px !important;
    }
}
@media (max-width: 375px) {
    .match-header h1 {
        font-size: 1em !important;
        padding: 0 4px !important;
        top: -6px !important;
    }
}
