/* participation_list.css */
.participation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 테이블 스타일 */
.participation-table-container {
    background: white;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.participation-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.participation-table th {
    background-color: var(--primary-color-5);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.participation-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 14px;
}

.participation-table tr:last-child td {
    border-bottom: none;
}

.division-td {
    font-weight: 500;
    color: var(--primary-color);
}

.default-td {
    background-color: white !important;
    cursor: auto !important;
}

.affiliation {
    color: var(--text-muted);
}

.date-td {
    font-size: 14px;
    color: var(--text-muted);
}

/* 삭제 버튼 */
.delete-participation {
    color: var(--danger-color);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.delete-participation:hover {
    opacity: 0.8;
}

/* 버튼 스타일 */
.inline-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-hover-color);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: white;
}

/* 참가자가 없을 때 */
.no-participation {
    text-align: center;
    padding: 48px 24px;
    background: white;
    border-radius: 12px;
    color: var(--text-muted);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .participation-container {
        padding: 0;
    }

    /* 테이블 스크롤 처리 */
    .participation-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .participation-table {
        min-width: 800px; /* 최소 테이블 너비 설정 */
    }

    .participation-table th,
    .participation-table td {
        padding: 12px;
        font-size: 14px;
        white-space: nowrap; /* 텍스트 줄바꿈 방지 */
    }

    .division-select-form select,
    .search-container input {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 4px;
    }

    .pagination-link {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

.division-select-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.division-select-form select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 입금상태 스타일 */
.payment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: small;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #FEE2E2;
    color: #DC2626;
}

.payment-status.paid {
    background-color: #DCFCE7;
    color: #16A34A;
}

.payment-status:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* 수정 가능한 셀 스타일 */
.player-row[data-editable="true"] {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.player-row[data-editable="true"]:hover {
    background-color: var(--bg-light);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* 버튼 기본 스타일 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 저장 버튼 */
.save-btn {
    background-color: var(--primary-color);
    color: white;
}

.save-btn:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-1px);
}

.save-btn:active {
    transform: translateY(0);
}

/* 취소 버튼 */
.cancel-btn {
    background-color: #f3f4f6;
    color: var(--text-color);
}

.cancel-btn:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

.cancel-btn:active {
    transform: translateY(0);
}

/* 버튼 컨테이너 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* 검색 결과 스타일링 */
.search-results {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
 }
 
 .search-results h3 {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
 }
 
 .player-result {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    transition: all 0.2s ease;
 }
 
 .player-result:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
 }
 
 .player-info {
    display: grid;
    gap: 6px;
 }
 
 .player-name {
    font-weight: 500;
    color: var(--text-color);
 }
 
 .select-btn {
    padding: 6px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
 }
 
 .select-btn:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-1px);
 }
 
 .select-btn:active {
    transform: translateY(0);
 }
 
 .no-results {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    background-color: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
 }

 #divisionSelect, #mergeDivisionSelect {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    color: var(--text-color);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#divisionSelect:hover {
    border-color: var(--primary-color);
}

#divisionSelect:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(34, 86, 178, 0.1);
}

#divisionSelect:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 탭 스타일 */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 탭 콘텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 제출 버튼 스타일 개선 */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 모달 애니메이션 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: white;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* 드롭다운 스타일 개선 */
#divisionSelect, #roleSelect {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    background-color: white;
    color: var(--text-color);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    transition: all 0.2s ease;
}

#divisionSelect:hover, #roleSelect:hover {
    border-color: var(--primary-color);
}

#divisionSelect:focus, #roleSelect:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 86, 178, 0.15);
}

/* 입력 필드 스타일 개선 */
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.form-group input:hover {
    border-color: #cbd5e1;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 86, 178, 0.15);
}

/* 모바일 대응 */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }
    
    .modal-tabs {
        margin-bottom: 16px;
    }
    
    .tab-btn {
        padding: 10px;
        font-size: 14px;
    }
}

.payment-filter-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: var(--primary-color-5);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.payment-filter-label:hover {
    border-color: var(--primary-color);
}

.payment-filter-text {
    margin-left: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

#unpaid-filter, #single-filter {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    background-color: white;
}

#unpaid-filter:checked, #single-filter:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

#unpaid-filter:checked::after, #single-filter:checked::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 미입금자 필터 모바일 스타일 */
@media (max-width: 768px) {
    .payment-filter-label {
        width: fit-content;
    }
}

.modal-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* 분할 탭 스타일 */
.create-groups-btn {
    margin-top: 8px;
    width: 100%;
}

.split-groups-container {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.split-group {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    min-height: 150px;
    background-color: #f8fafc;
}

.split-group h4 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.split-group-name {
    flex: 1;
}

.edit-group-name {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s ease;
}

.edit-group-name:hover {
    color: var(--primary-color);
}

.player-item {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: grab;
    transition: all 0.2s ease;
    font-size: 14px;
}

.player-item:hover {
    background-color: #f1f5f9;
    border-color: var(--primary-color);
}

.player-item.dragging {
    opacity: 0.6;
    background-color: #e2e8f0;
}

.players-list {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
    position: sticky;
    bottom: 0;
    background-color: white;
}

.players-list h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--text-color);
}

.players-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.group-placeholder {
    border: 2px dashed var(--primary-color);
    background-color: rgba(34, 86, 178, 0.05);
    border-radius: 6px;
    min-height: 50px;
}

.player-count {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-muted);
    margin-left: 5px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .split-groups-container {
        grid-template-columns: 1fr;
    }
    
    .players-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 그룹 이름 편집 스타일 */
.group-name-edit {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
}

/* 모달 설명 스타일 */
.modal-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.4;
}

.selected-division {
    font-size: 14px;
    background-color: #f9fafb;
    padding: 8px;
    border-left: 4px solid #2563eb;
    margin-bottom: 12px;
    border-radius: 4px;
}

.group-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 6px;
}

.tab-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #999;
}

.tab-btn.disabled:hover {
    color: #999;
    border-bottom-color: transparent;
}

.drop-zone {
    min-height: 50px;
}

.drop-zone.drag-over {
    border: 2px dashed var(--primary-color);
    background-color: #f1f5f9;
}

.reverse-btn {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: var(--primary-color);
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background-color: white;
}

/* 다이얼로그 기본 스타일 */
.schedule-dialog {
    padding: 20px;
    border: none;
    border-radius: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    width: 90%;
    max-width: 1000px;
    margin: auto;
    background: white;
}
 
.schedule-dialog::backdrop {
    background: rgba(0,0,0,0.5);
}

.custom-alert {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.custom-alert .schedule-dialog {
    max-width: 400px;
}

.accent-btn {
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    width: fit-content;
    font-size: 14px;
    margin-left: 5px;
}

.accent-btn:hover {
    background-color: var(--accent-hover-color);
    cursor: pointer;
}

.dialog-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    margin: 0 0 20px 0;
}

.dialog-content {
    padding: 0 24px;
}

.dialog-content p {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dialog-actions .cancel-btn {
    background-color: var(--bg-heavy-light);
    color: var(--text-muted);
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-actions .cancel-btn:hover {
    background-color: #ddd;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모바일 대응 */
@media (max-width: 480px) {
    .schedule-dialog {
        max-width: 100%;
    }
    
    .dialog-header {
        padding: 16px 20px 0;
    }

    .dialog-header h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .dialog-content {
        padding: 12px 20px 20px;
    }
}

.participation-table-container.dragging {
  cursor: grabbing;
  user-select: none;     /* ✅ 드래그 중 텍스트 선택 방지 */
}
