/*!
 * Copyright © 2024 Spotlite (https://spotlite.com)
 * This stylesheet is part of the Spotlite tournament system.
 * Unauthorized reproduction or redistribution is prohibited.
 */

/* 대진표 제목 컨테이너 스타일 */
.schedule-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-gray-700);
    margin: 0;
}

/* 부문 제목 스타일 */
.division-title {
    color: var(--color-blue-800);
    font-weight: bold;
    margin-right: 8px;
}

/* 경기 일정 섹션 스타일 */
.schedule-section {
    width: 100%;
    background-color: white;
    border-radius: 12px;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    margin-bottom: 1rem; 
    border: 1px solid var(--color-gray-300);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 섹션 내 구분선 */
.schedule-section > div:not(:last-child) {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--color-gray-300);
}

/* 리그 테이블 기본 스타일 */
.league-table.diagonal-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: auto;
    font-size: var(--text-sm);
}

/* 테이블 셀 공통 스타일 */
.league-table.diagonal-table th {
    border: 1px solid #e0e0e0;
    padding: 12px;
    position: relative;
    min-width: 120px;
    max-width: 120px;
    font-weight: normal;
}

/* 선수명 셀 스타일 */
.league-table.diagonal-table th span {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.league-table.diagonal-table th span p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 대각선 셀 스타일 */
/* 대각선 셀 스타일 - ::before를 사용한 간단한 방법 */
.league-table.diagonal-table .diagonal {
    position: relative;
    background: white;
}

.league-table.diagonal-table .diagonal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top right, transparent 49.5%, #e0e0e0 49.5%, #e0e0e0 50.5%, transparent 50.5%);
    pointer-events: none;
}

/* tbody의 첫 번째 tr에 있는 diagonal 셀 배경색 */
.league-table.diagonal-table tbody tr:first-child .diagonal {
    background-color: #f3f4f6; /* gray-100 */
}

/* 경기 순서 번호 스타일 */
.league-table.diagonal-table .match-info {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-blue-800);
    white-space: normal;
}

/* 검색 결과 강조 */
.league-table.diagonal-table span.searched {
    background-color: rgb(255, 239, 213, 0.5);
}

/* tbody의 첫 번째 tr 배경색 */
.league-table.diagonal-table tbody tr:first-child {
    background-color: var(--color-gray-100);
}

/* 각 tr의 첫 번째 th 배경색 */
.league-table.diagonal-table tbody tr th:first-child {
    background-color: var(--color-gray-100);
}

/* 카드 스타일 */
.league-cards {
    display: none;
}

/* 반응형 디자인 */
@media screen and (max-width: 600px) {
    .schedule-section {
        padding: 0.75rem 1rem;
    }
    
    .league-table {
        display: none;
    }

    .league-cards {
        display: block;
    }
}

.bracket-table {
    width: 100%;
    white-space: nowrap;
}

.bracket-cell {
    min-width: 40px;
    text-align: center;
    vertical-align: middle;
    font-size: smaller;
    padding: 5px 8px;
}

.clickable {
    color: var(--color-blue-700);
    cursor: pointer;
}

.clickable:hover {
    background-color: var(--bg-light) !important;
}
