/* 공통 컨테이너 스타일 - 크기 축소 + 스크롤 추가 */
.coordinate-list-container {
    width: 100%;
    min-width: 220px;   /* 250px → 220px */
    max-width: 280px;   /* 300px → 280px */
    margin: 8px 0 0 0;
    padding: 0;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    list-style: none;
    
    /* 스크롤바 관련 속성 추가 */
    max-height: 120px;              /* 143px → 120px */
    overflow-y: auto;               /* 세로 스크롤바 활성화 */
    overflow-x: hidden;             /* 가로 스크롤바 비활성화 */
    
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* 커스텀 스크롤바 스타일 (선택사항) */
.coordinate-list-container::-webkit-scrollbar {
    width: 5px;         /* 6px → 5px */
}

.coordinate-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.coordinate-list-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.coordinate-list-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 공통 아이템 스타일 */
.coordinate-item {
    border-bottom: 1px solid #f3f4f6;
}

.coordinate-item:last-child {
    border-bottom: none;
}

/* 라디오 버튼 숨기기 */
.coordinate-item input[type="radio"] {
    display: none;
}

/* 공통 라벨 스타일 - 패딩 축소 */
.coordinate-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 8px;   /* 6px 10px → 5px 8px */
    font-size: 12px;    /* 폰트 사이즈 통일 */
    color: #374151;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.coordinate-item label:hover {
    background-color: #f9fafb;
    color: #1f2937;
}

/* 커스텀 라디오 버튼 - 크기 축소 */
.radio-custom {
    width: 10px;        /* 12px → 10px */
    height: 10px;       /* 12px → 10px */
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 4px;  /* 5px → 4px */
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-custom::after {
    content: '';
    width: 4px;         /* 5px → 4px */
    height: 4px;        /* 5px → 4px */
    border-radius: 50%;
    background: #3b82f6;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

/* 선택된 상태 */
.coordinate-item input[type="radio"]:checked + label {
    background-color: #f0f9ff;
    color: #1e40af;
    font-weight: 500;
}

.coordinate-item input[type="radio"]:checked + label .radio-custom {
    border-color: #3b82f6;
}

.coordinate-item input[type="radio"]:checked + label .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

/* 호버 효과 */
.coordinate-item label:hover .radio-custom {
    border-color: #9ca3af;
}

/* 텍스트 스타일 */
.coordinate-text {
    user-select: none;
}

/* 포커스 스타일 */
.coordinate-item input[type="radio"]:focus + label .radio-custom {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* 업로드 카드 스타일 - 패딩 축소 및 위치 정렬 */
.upload-card {
    background: #fff;
    padding: 8px;       /* 10px → 8px */
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px; /* 10px → 8px */
    display: inline-block;
    vertical-align: top;
}

/* 제목 스타일 통일 */
.upload-card strong {
    font-size: 13px;    /* 14px → 13px */
    color: #374151;
    display: block;
    margin-bottom: 6px; /* 8px → 6px */
}

/* 두 박스를 나란히 배치하기 위한 컨테이너 */
.form-section {
    display: flex;
    gap: 12px;          /* 16px → 12px */
    align-items: flex-start;
    flex-wrap: wrap;
}

.form-section .upload-card {
    flex: 0 0 auto;
    margin-bottom: 0;
}

/* 전체 카드에 대한 기본 스타일 */
.upload-card.column-setting-card {
    background-color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
}

/* 카드 제목 스타일 */
.upload-card.column-setting-card > strong {
    font-size: 13px;    /* 폰트 사이즈 통일 */
    font-weight: 600;
    color: #1f2937;
    display: block;
    margin-bottom: 16px;
}

/* 두 컬럼 선택자를 감싸는 래퍼 스타일 */
.column-selectors-wrapper {
    display: flex;
    gap: 12px; /* 두 선택자 사이의 간격 */
    margin-bottom: 12px;
}

/* 각 컬럼 설정 아이템 스타일 */
.column-setting-item {
    flex: 1; /* 공간을 균등하게 분배 */
    display: flex;
    align-items: center;
    gap: 6px; /* 라벨과 선택 상자 사이의 간격 */
}

/* 라벨 스타일 */
.column-setting-item label {
    font-size: 13px;
    color: #4b5563;
    white-space: nowrap; /* 텍스트가 줄바꿈되지 않도록 설정 */
    flex-shrink: 0;
}

/* 선택 상자(select) 스타일 */
.column-setting-item select {
    width: 100%; /* 아이템 내에서 가능한 최대 너비를 차지 */
    padding: 6px 10px;
    font-size: 13px;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
}

/* 선택 상자 비활성화 상태 스타일 */
.column-setting-item select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* 하단 도움말 텍스트 스타일 */
.encoding-hint {
    font-size: 12px;
    color: #6b7280;
    text-align: center; /* 텍스트 가운데 정렬 */
    margin-top: 8px;    /* 상단 여백 */
}

/* 레이어 이름 설정 스타일 */
.layer-name-container {
    background: #fff;
    padding: 0; /* 좌표계 선택과 동일하게 padding 0 */
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin: 8px 0 0 0; /* 좌표계 선택과 동일 */
    width: 100%;
    min-width: 220px;
    max-width: 280px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
}

.layer-name-item {
    display: flex;
    flex-direction: column;
    gap: 6px; /* 라벨과 입력 필드 사이 간격 */
    padding: 8px 12px; /* 좌표계 아이템과 유사한 패딩 */
    border-bottom: 1px solid #f3f4f6; /* 좌표계 아이템과 동일 */
}

.layer-name-item:last-child {
    border-bottom: none; /* 마지막 아이템은 하단 보더 제거 */
}

.layer-name-item label {
    font-size: 12px; /* 좌표계 라벨과 동일 크기 */
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 0;
    text-align: left; /* 왼쪽 정렬 */
}

.layer-name-input {
    width: 100%;
    padding: 6px 10px; /* 기존 select와 동일 패딩 */
    font-size: 13px; /* 기존과 일치 */
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.layer-name-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); /* 기존 focus 스타일과 일치 */
}

.layer-name-input::placeholder {
    color: #9ca3af; /* 기존 disabled 색상과 일치 */
    font-size: 12px;
}

/* 레이어 이름 입력 시 호버 효과 */
.layer-name-input:hover:not(:focus) {
    border-color: #9ca3af;
}

/* 레이어 설명 textarea 스타일 */
.layer-description-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.layer-description-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.layer-description-input::placeholder {
    color: #9ca3af;
    font-size: 12px;
}

.layer-description-input:hover:not(:focus) {
    border-color: #9ca3af;
}

/* 좌표 방식 토글 스타일 */
.coord-type-toggle {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.coord-type-toggle .radio-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    user-select: none;
}

.coord-type-toggle input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.coord-type-toggle input[type="radio"]:hover {
    border-color: #9ca3af;
}

.coord-type-toggle input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.coord-type-toggle input[type="radio"]:checked {
    border-color: #3b82f6;
    background-color: #3b82f6;
}

.coord-type-toggle input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* WKT 선택 시 단일 컬럼 스타일 */
#wktSelection .column-setting-item {
    max-width: 300px; /* WKT는 하나만 있으니 너비 제한 */
}

/* 힌트 텍스트 동적 변경을 위한 클래스 */
.encoding-hint.xy-mode::before {
    content: "※ 좌표정보가 포함된 (X , Y) 컬럼을 선택하세요.";
}

.encoding-hint.wkt-mode::before {
    content: "※ WKT 형식의 좌표정보가 포함된 컬럼을 선택하세요.";
}

.encoding-hint.xy-mode,
.encoding-hint.wkt-mode {
    text-align: center;
}

.upload-dropzone {
    position: relative;
}

.remove-file-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

.remove-file-btn:hover {
    background-color: #cc0000;
}
