﻿@font-face {
    font-family: 'Pretendard';
    src: url('/fonts/Pretendard-Regular.woff2') format('woff2'), url('/fonts/Pretendard-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Pretendard Variable', Pretendard;
    box-sizing: border-box;
}

body {
    background: #F4F7FC;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
}

.logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo i {
        color: white;
        font-size: 24px;
    }

.title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    margin-bottom: 32px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-group-half {
    flex: 1;
    text-align: left;
}

    .form-group-half .form-label {
        display: block;
        font-weight: 600;
        color: #374151;
        margin-bottom: 6px;
        font-size: 14px;
    }

    .form-group-half .form-control {
        width: 100%;
        padding: 8px 8px;
        border-radius: 8px;
        font-size: 12px;
        background: #F2F2F2;
    }

    .form-group-half .field-validation-error {
        color: #dc2626;
        font-size: 12px;
        margin-top: 4px;
    }

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    height: 30px;
    padding: 8px 8px;
    border: 2px solid #F2F2F2;
    border-radius: 8px;
    font-size: 12px;
    background: #F2F2F2;
}

    .form-control:focus {
        outline: none;
        border-color: #2980FF;
    }

/* 기존 .form-select 스타일 주석처리 (Select2로 대체) */
/*
.form-select {
    width: 100%;
    height: 32px;
    padding: 8px 8px;
    border: 0px;
    border-radius: 8px;
    font-size: 12px;
    background: #F2F2F2;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    .form-select:focus {
        outline: none;
        border: 2px solid #2980FF;
        background: white;
    }

    .form-select.input-validation-error {
        border: 2px solid #dc2626 !important;
        border-color: #dc2626;
    }
*/

/* 기존 일반 select용 화살표 주석처리 */
/*
.form-group {
    position: relative;
}

    .form-group .form-select {
        padding-right: 30px;
    }

    .form-group:has(select:not(.select2-hidden-accessible))::after {
        content: '▼';
        position: absolute;
        top: 27px;
        right: 11px;
        transform: translateY(-50%);
        color: #666;
        font-size: 12px;
        pointer-events: none;
        z-index: 1;
        margin-top: 12px;
        transition: color 0.2s ease;
    }

    .form-group:has(select:not(.select2-hidden-accessible)):hover::after {
        color: #2980FF;
    }
*/

.btn-primary {
    width: 60%;
    background: #2980FF;
    border: none;
    color: white;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
}

    .btn-primary:hover {
        background: #5799F9;
    }

.login-link {
    margin-top: 24px;
    color: #666;
    font-size: 14px;
}

    .login-link a {
        color: #667eea;
        text-decoration: none;
        font-weight: 600;
    }

        .login-link a:hover {
            text-decoration: underline;
        }

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: left;
}

.field-validation-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

.form-control.input-validation-error {
    border-color: #dc2626;
}

.required {
    color: #dc2626;
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin: 16px 0;
    text-align: left;
}

.form-check-input {
    margin-right: 8px;
    margin-top: 2px;
}

.form-check-label {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* 컨테이너 기본 설정 */
.select2-container {
    width: 100% !important;
}

/* 단일선택용 Select2 스타일 (Country, Industry) */
.select2-container--default .select2-selection--single {
    border: 0px;
    border-radius: 8px;
    background: #F2F2F2;
    height: 32px;
    font-size: 12px;
    line-height: 1.2;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #374151;
        line-height: 30px; /* 32px 높이에 맞춰 수직 정렬 */
        padding-left: 8px;
        padding-right: 30px; /* 화살표 공간 */
        font-size: 12px;
    }

    .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: #777;
        font-size: 12px;
        line-height: 30px;
        padding-left: 4px;
    }

/* 단일선택 포커스 상태 */
.select2-container--default.select2-container--focus .select2-selection--single {
    border: 2px solid #2980FF;
    background: white;
    outline: none;
    box-shadow: none;
}

/* 단일선택 기본 화살표 숨기기 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

/* 단일선택용 커스텀 화살표 (Country, Industry) */
#countrySelect + .select2-container::after,
#industrySelect + .select2-container::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s ease, color 0.2s ease;
}

#countrySelect + .select2-container:hover::after,
#industrySelect + .select2-container:hover::after {
    color: #2980FF;
}

#countrySelect + .select2-container.select2-container--open::after,
#industrySelect + .select2-container.select2-container--open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 다중선택용 Select2 스타일 (Role) */
.select2-container--default .select2-selection--multiple {
    border: 0px;
    border-radius: 8px;
    background: #F2F2F2;
    padding: 2px 8px;
    min-height: 32px;
    font-size: 12px;
    position: relative;
}

/* Role Select2 커스텀 화살표 */
#roleSelect + .select2-container::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s ease, color 0.2s ease;
}

#roleSelect + .select2-container:hover::after {
    color: #2980FF;
}

#roleSelect + .select2-container.select2-container--open::after {
    transform: translateY(-50%) rotate(180deg);
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: 2px solid #2980FF;
    background: white;
    outline: none;
    box-shadow: none;
}

/* 다중선택 검색 입력 필드 */
.select2-container--default .select2-search--inline .select2-search__field {
    border: none;
    outline: none;
    font-size: 12px;
    background: transparent;
    margin: 0;
    padding: 6px 0 2px 0;
    min-height: 16px;
}

/* 다중선택의 선택된 항목들 (Role용) */
.select2-container--default .select2-selection__choice {
    background: #2980FF;
    border: 1px solid #2980FF;
    border-radius: 4px;
    color: black;
    font-size: 12px;
    padding: 2px 6px;
    margin: 2px 4px 2px 0;
    line-height: 1.2;
}

.select2-container--default .select2-selection__choice__remove {
    color: black;
    margin-right: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

    .select2-container--default .select2-selection__choice__remove:hover {
        color: #ffcccc;
    }

/* 드롭다운 공통 스타일 */
.select2-dropdown {
    border: 1px solid #F2F2F2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    z-index: 9999;
}

/* 검색 입력 필드 (드롭다운 내부) */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #F2F2F2;
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
}

.select2-container--default .select2-results > .select2-results__options {
    max-height: 300px; /* 원하는 높이로 조정 */
}

/* 드롭다운 옵션들 */
.select2-results__option {
    padding: 8px 12px;
    font-size: 12px;
    color: #374151;
}

/* 옵션 호버 상태 */
.select2-results__option--highlighted[aria-selected] {
    background-color: #f8f9fa;
    color: #374151;
}

/* 선택된 옵션 */
.select2-results__option[aria-selected=true] {
    background-color: #e3f2fd;
    color: #2980FF;
    font-weight: 600;
}

/* 에러 상태 스타일링 */
.input-validation-error + .select2-container .select2-selection--single,
.input-validation-error + .select2-container .select2-selection--multiple {
    border: 2px solid #dc2626 !important;
    background: #F2F2F2;
}

/* 반응형 */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single,
    .select2-container--default .select2-selection--multiple {
        min-height: 36px;
    }

    .select2-container--default .select2-search--inline .select2-search__field {
        font-size: 16px; /* iOS에서 줌 방지 */
    }
}

/* 전체 동의 체크박스 스타일 */
.form-check.select-all {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 20px 0 16px 0;
    background-color: #f8f9fa;
}

.select-all-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* 구분선 */
.checkbox-separator {
    height: 1px;
    background-color: #e0e0e0;
    margin: 16px 0;
}

/* 개별 체크박스들 */
.form-check:not(.select-all) {
    margin-left: 8px;
    position: relative;
}

/* Terms of Service Modal Styles */
.terms-link {
    color: #2980FF;
    text-decoration: underline;
    cursor: pointer;
}

    .terms-link:hover {
        color: #5799F9;
    }

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    display: none !important;
}

    .modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    z-index: 1001;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.terms-modal-content {
    max-width: 600px;
    max-height: 85vh;
}

.modal-header {
    padding: 20px 24px 0 24px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

    .modal-header h3 {
        margin: 0;
        color: #333;
        font-size: 20px;
        font-weight: 600;
    }

.modal-close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-close-btn:hover {
        color: #333;
    }

.btn-accept {
    background: #2980FF;
    color: white;
}

    .btn-accept:hover {
        background: #5799F9;
    }

.modal-body {
    padding: 20px 24px;
    flex: 1;
}

.terms-modal-body {
    overflow-y: auto;
    max-height: 60vh;
}

.terms-content {
    text-align: left;
}

    .terms-content h4 {
        color: #333;
        font-size: 16px;
        font-weight: 600;
        margin: 20px 0 10px 0;
    }

        .terms-content h4:first-child {
            margin-top: 0;
        }

    .terms-content p {
        color: #666;
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
    }

    .terms-content ul {
        color: #666;
        font-size: 14px;
        line-height: 1.6;
        margin: 10px 0 15px 20px;
    }

    .terms-content li {
        margin-bottom: 5px;
    }

.modal-footer {
    padding: 15px 24px 20px 24px;
    text-align: center;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: center;
}

    .modal-footer .btn {
        border: none;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        width: 100px;
        transition: background-color 0.2s ease;
    }

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

    .btn-secondary:hover {
        background: #d0d0d0;
    }

.modal-footer .btn-primary {
    background: #2980FF;
    color: white;
}

    .modal-footer .btn-primary:hover {
        background: #5799F9;
    }

/* 스크롤바 스타일링 */
.terms-modal-body::-webkit-scrollbar {
    width: 6px;
}

.terms-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.terms-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

    .terms-modal-body::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

/* Terms checkbox error styling */
.terms-checkbox-error {
    border: 2px solid #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2) !important;
    outline: none !important;
}

    .terms-checkbox-error + label {
        color: #dc2626 !important;
    }

/* 체크박스 크기 조정 (에러 표시가 더 잘 보이도록) */
.form-check-input {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    margin-top: 2px;
}

/* Language buttons styling */
.language-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .lang-btn:hover {
        background: #f5f5f5;
        border-color: #ccc;
    }

    .lang-btn.active {
        background: #2980FF;
        color: white;
        border-color: #2980FF;
    }

        .lang-btn.active:hover {
            background: #5799F9;
            border-color: #5799F9;
        }

/* 비밀번호 유효성 검사 메시지 스타일 (기존 field-validation-error와 동일) */
.password-validation {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

/* 비밀번호 확인 검사 메시지 스타일 (기존 field-validation-error와 동일) */
.confirm-password-validation {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

/* 에러 텍스트 스타일 (아이콘 포함) */
.validation-error {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 포커스 상태 우선순위 조정 */
.form-control:focus:not(.input-validation-error) {
    border-color: #2980FF !important;
}

.form-control.input-validation-error {
    border-color: #dc2626 !important;
}

    .form-control.input-validation-error:focus {
        border-color: #dc2626 !important;
    }
