/* ==========================================================================
   Match Components
   ========================================================================== */

.match-header {
    text-align: center;
    margin-bottom: 20px;
}

.competition-name {
    color: #666;
    margin-bottom: 10px;
}

.match-title {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.team-names {
    font-size: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.match-score {
    font-weight: bold;
    margin: 0 20px;
    color: var(--primary-color);
}

.match-card {
    padding-top: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.match-card.has-admin-controls {
    padding-right: 100px;
}

.match-title {
    text-align: center;
    margin: 8px 0 10px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.match-content {
    display: flex;
    align-items: center;
    padding: 0 15px 15px;
    justify-content: center;
}

.match-admin-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
    width: 85px;
}

.match-admin-controls .tb-btn {
    padding: 4px 8px;
    font-size: 12px;
    min-height: 28px;
    width: 100%;
    line-height: 1.2;
}

.match-title.editable-cell {
    margin-bottom: 10px;
}

.match-title .display-value {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.match-title .display-value:hover {
    background-color: #f0f0f0;
}

.match-title .edit-input {
    font-size: 1.1em;
    font-weight: bold;
    width: 100%;
    padding: 5px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    text-align: center;
}

.team-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    padding-right: 10px;
}

.team-container:last-child {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 10px;
}

.team-link {
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: var(--transition);
    position: relative;
    padding: 4px 8px;
    border-radius: 4px;
    max-width: 120px;
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.team-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
}

.team-link::after {
    content: 'View Team Sheet';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6em;
    color: #666;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.team-link:hover::after {
    opacity: 1;
}

.team-link-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-container {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    width: 100px;
}

.score-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3em;
    padding: 5px 15px;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.score-link:hover {
    background-color: #f0f7ff;
    text-decoration: none;
}

.score-link::after {
    content: 'View Stats';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6em;
    color: #666;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.score-link:hover::after {
    opacity: 1;
}

/* Team color utilities */
.team-a-color {
    color: var(--team-a-color);
    text-shadow: var(--team-text-shadow);
}

.team-b-color {
    color: var(--team-b-color);
    text-shadow: var(--team-text-shadow);
}

/* Team-specific table styling */
#team-a-table thead th {
    background-color: var(--team-a-color);
}

#team-b-table thead th {
    background-color: var(--team-b-color);
}

/* Subtle team color accent on table rows */
#team-a-table tbody tr {
    border-left: 3px solid var(--team-a-color);
}

#team-b-table tbody tr {
    border-left: 3px solid var(--team-b-color);
}
