/* 사전등록 페이지 스타일 */

/* 기본 설정 */
.registration-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.registration-content {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

/* 개인정보 동의 이미지 */
.privacy-header {
  width: 100%;
  overflow: hidden;
}

.privacy-image {
  width: 100%;
  height: auto;
  display: block;
}

/* 개인정보 동의 체크박스 */
.privacy-agreement {
  padding: 40px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-checkbox input[type='checkbox'] {
  display: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border: 2px solid #ddd;
  border-radius: 6px;
  margin-right: 12px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-checkbox input[type='checkbox']:checked + .checkbox-label .checkbox-custom {
  background-color: #007bff;
  border-color: #007bff;
}

.custom-checkbox input[type='checkbox']:checked + .checkbox-label .checkbox-custom::after {
  opacity: 1;
}

/* 폼 컨테이너 */
.form-container {
  padding: 50px;
}

/* 폼 그룹 */
.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.required {
  color: #dc3545;
}

/* 폼 컨트롤 */
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  background-color: #fff;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Select2 커스터마이징 */
.select2-container {
  width: 100% !important;
}

/* 전화번호 국가코드 Select2는 너비 고정 */
.phone-country-select + .select2-container {
  width: 120px !important;
}

.select2-selection--single {
  height: 48px !important;
  border: 2px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 0 16px !important;
}

.select2-selection--single .select2-selection__rendered {
  line-height: 44px !important;
  padding-left: 0 !important;
  font-size: 16px !important;
  color: #333 !important;
}

.select2-selection--single .select2-selection__arrow {
  height: 44px !important;
  right: 10px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #007bff !important;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

.select2-dropdown {
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.select2-results__option {
  padding: 12px 16px !important;
  font-size: 16px !important;
}

.select2-results__option--highlighted {
  background-color: #007bff !important;
}

/* 국기 이미지 스타일 */
.country-flag {
  width: 24px;
  height: 18px;
  margin-right: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* 휴대폰번호 입력 그룹 */
.phone-input-group {
  display: flex;
  gap: 10px;
}

.phone-country-select {
  flex: 0 0 80px;
}

.phone-number-input {
  flex: 1;
}

/* 상태 메시지 */
.email-check-status,
.phone-check-status,
.password-strength,
.password-match-status {
  margin-top: 8px;
  font-size: 14px;
  min-height: 20px;
}

.email-check-status.checking {
  color: #6c757d;
}

.email-check-status.available {
  color: #28a745;
}

.email-check-status.unavailable {
  color: #dc3545;
}

.phone-check-status.checking {
  color: #6c757d;
}

.phone-check-status.available {
  color: #28a745;
}

.phone-check-status.unavailable {
  color: #dc3545;
}

.password-strength {
  font-size: 12px;
}

.password-strength.weak {
  color: #dc3545;
}

.password-strength.medium {
  color: #ffc107;
}

.password-strength.strong {
  color: #28a745;
}

.password-match-status.match {
  color: #28a745;
}

.password-match-status.no-match {
  color: #dc3545;
}

/* 에러 메시지 */
.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 5px;
  font-size: 14px;
  color: #dc3545;
}

/* 제출 버튼 */
.submit-group {
  margin-top: 40px;
  margin-bottom: 20px;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-submit:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  display: none;
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 로딩 스피너 */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 등록 확인 링크 */
.registration-check-link {
  text-align: center;
  margin-top: 20px;
  color: #6c757d;
  font-size: 14px;
}

.registration-check-link a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.registration-check-link a:hover {
  text-decoration: underline;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .registration-container {
    padding: 1rem 10px;
    margin: 10px auto;
  }

  .form-container {
    padding: 30px 20px;
  }

  .privacy-agreement {
    padding: 25px 20px;
  }

  .checkbox-label {
    font-size: 14px;
  }

  .form-control {
    font-size: 16px; /* iOS에서 줌 방지 */
  }

  .btn-submit {
    font-size: 16px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .registration-container {
    margin: 5px auto;
    padding: 5px;
  }

  .registration-content {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #e9ecef;
  }

  .form-container {
    padding: 15px;
  }

  .privacy-agreement {
    padding: 15px;
  }
}

/* 접근성 향상 */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* 밝은 테마 강화 */
.registration-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
}

.privacy-agreement {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.form-control {
  background-color: #ffffff;
  border-color: #dee2e6;
}

.form-control:focus {
  background-color: #ffffff;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}
