/* ==================== 회원가입 스타일 ==================== */
/* 이메일 인증 버튼 */
.email-verify-wrapper {
  position: relative;
  display: flex;
  gap: 8px;
}

.email-verify-field {
  flex: 1;
}

.verify-button {
  background: var(--color-gray-950);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
  min-width: 102px;
  height: 48px;
}

.verify-button:hover:not(.disabled) {
  opacity: 0.8;
}

.verify-button.disabled {
  background: var(--bg-gray-400);
  cursor: not-allowed;
  opacity: 1;
}

.verify-button.resend {
  background: var(--bg-gray-950);
}

.verify-button.resend:hover {
  opacity: 0.8;
}

.verify-button.verified {
  background: var(--bg-gray-500);
  cursor: default;
}

.verify-button.verified:hover {
  opacity: 1;
}

/* 인증번호 입력 필드 래퍼 - 가로 배치 */
.verify-code-wrapper {
  display: flex;
  gap: 8px;
}

.verify-code-wrapper .input-wrapper {
  flex: 1;
}

/* 인증번호 타이머 */
.verify-timer {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bg-red);
  font-size: 14px;
  font-weight: 500;
}

/* 인증완료 버튼 - 재전송 버튼과 동일한 크기 */
.verify-complete-button {
  background: var(--bg-gray-950);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
  min-width: 102px;
  height: 48px;
}

.verify-complete-button:hover:not(.disabled) {
  opacity: 0.8;
}

.verify-complete-button.disabled {
  background: var(--bg-gray-400);
  cursor: not-allowed;
  opacity: 1;
}

/* 약관 동의 */
.terms-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0 0 0;
}

.term-item-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.term-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.term-all {
  font-weight: 600;
}

.term-label {
  color: var(--color-gray-500);
  font-size: 12px;
  flex: 1;
}

.term-all .term-label {
  font-size: 14px;
  font-weight: 600;
}

.term-item:not(.term-all) {
  padding-left: 10px;
}

.term-link {
  color: var(--color-gray-500);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.term-link:hover {
  opacity: 0.8;
}

.check-box:hover,
.term-item:hover .check-box {
  border: 1px solid var(--bg-gray-950);
}

/* ==================== 로그인 팝업 스타일 (수정됨) ==================== */
.login-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0);
  z-index: 9999;
  visibility: hidden;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.login-popup-overlay.active {
  visibility: visible;
  background: rgba(3, 7, 18, 0.8);
}

/* 내용이 짧을 때는 센터, 길 때는 상단 고정 */
.login-popup-overlay:not(.overflow-mode) {
  align-items: center !important;
  justify-content: center !important;
}

.login-popup-overlay.overflow-mode {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding: 92px 0 76px 0 !important;
}

.login-popup-container {
  background: var(--bg-gray-100);
  width: 588px;
  max-width: 90%;
  border-radius: 16px;
  position: relative;
  padding: 78px;
  margin: 0 auto;
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-popup-overlay.active .login-popup-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ==================== 팝업 닫기 애니메이션 제거 ==================== */
.popup-overlay.closing,
.login-popup-overlay.closing {
  transition: none !important;
}

.popup-overlay.closing .popup-container,
.login-popup-overlay.closing .login-popup-container {
  transition: none !important;
}

.signup-text {
  color: var(--color-gray-500);
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  width: 100%;
}

.signup-link {
  color: var(--color-gray-500);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
}

.signup-link:hover {
  opacity: 0.8;
}
