/* ============================================
   로그인 페이지 스타일시트 (login.css)
   ============================================
   - 로그인 폼 레이아웃
   - 모바일/태블릿 반응형 디자인
   - Pretendard 폰트 적용
   ============================================ */

/* ============================================
   Pretendard 폰트 정의
   ============================================ */
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Light.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Medium.woff2') format('woff2');
  font-weight: 500;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Bold.woff2') format('woff2');
  font-weight: 700;
}

/* ============================================
   기본 스타일
   ============================================ */
body {
  user-select: none;
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', sans-serif;
  display: flex;
  justify-content: center;
  background-color: #ffffff;
  color: #333;
}

/* ============================================
   로고 영역 스타일
   ============================================ */
.logo-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  position: absolute;
  top: 300px;
  left: 0;
}

.logo-img {
  width: 600px;
  height: 92px;
}

/* ============================================
   로그인 컨테이너 스타일
   ============================================ */
.login-container {
  width: 600px;
  text-align: center;
  margin-top: 400px; /* 로고 아래 위치 정확하게 맞춤 */
  box-sizing: border-box;
}

.login-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

/* ============================================
   로그인 필드 스타일
   ============================================ */
.login-field {
  display: flex;
  align-items: center;
}

/* ============================================
   라벨 스타일
   ============================================ */
label {
  display: inline-block;
  width: 80px;
  text-align: left;
  margin-left: 70px;
  font-size: 15px;
}

/* ============================================
   입력창 래퍼 스타일
   ============================================ */
.input-wrapper {
  position: relative;
  width: 387px;
}

input {
  width: 387px;
  height: 39px;
  margin-left: -30px;
  padding: 7px 36px 7px 12px;
  border-radius: 7px;
  border: 1px solid #ccc;
  font-size: 15px;
  box-sizing: border-box;
}
input:hover,
input:focus {
  outline: none;
  border-color: #71a6fe;
}

/* ============================================
   입력 필드 초기화 버튼 (X 버튼) 스타일
   ============================================ */
.clear-btn {
  position: absolute;
  right: 25px;
  top: 5%;
  transform: translateY(-50%);
  font-size: 16px;
  cursor: pointer;
  color: #aaa;
}
.clear-btn:hover {
  color: #333;
}

/* ============================================
   로그인 버튼 스타일
   ============================================ */
.login-button {
  width: 208px;
  height: 47px;
  margin-top: 15px;
  margin-left: 15px;
  margin-right: 10px;

  font-size: 16px;
  font-weight: bold;
  color: #286ad7;

  background-color: #f8f9fa;
  border: 3px solid #71a6fe;
  border-radius: 7px;

  cursor: pointer;
  box-sizing: border-box;
  display: inline-block;
}
.login-button:hover {
  color: #ffffff;
  border: none;
  background-color: #286ad7;
}

/* ============================================
   로그인 메시지 스타일
   ============================================ */
#loginMessage {
  display: block;
  height: 18px;              
  line-height: 18px;         
  overflow: hidden;          
  white-space: nowrap;      
  text-overflow: ellipsis;
  color: red;
  font-size: 13px;
  margin-top: -10px;
  text-align: center;
}

/* ============================================
   로딩 오버레이 스타일
   ============================================ */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 18px;
}
.spinner {
  font-size: 18px;
  color: #333;
}

.remember-me-container {
  margin-top: -5px; /* 비밀번호 칸과의 간격 */
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.remember-wrapper {
  display: flex;
  align-items: center;
  /* (label 너비 80px + label 마진 70px) - input 음수마진 30px = 120px */
  margin-left: 138px; 
}

#rememberId {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important; /* 기존 input 마진 상속 방지 */
  cursor: pointer;
  accent-color: #71a6fe; /* 체크박스 포인트 색상 */
}

.remember-label {
  width: auto !important;
  margin-left: 8px !important;
  font-size: 14px !important;
  color: #666;
  cursor: pointer;
  user-select: none;
  line-height: 18px; /* 체크박스와 높이 맞춤 */
}

/* ============================================
   반응형 스타일
   ============================================
   - 태블릿 및 작은 화면 (최대 768px)
   - 스마트폰 전용 (최대 480px)
   ============================================ */

/* ============================================
   태블릿 및 작은 화면 반응형 (최대 768px)
   ============================================ */
@media screen and (max-width: 768px) {
  .logo-wrapper {
    top: 150px; /* 로고 위치 상단으로 조정 */
  }

  .logo-img {
    width: 30%; /* 로고 너비를 화면에 맞게 조절 */
    height: auto; /* 비율 유지 */
  }

  .login-container {
    width: 90%;
    margin-top: 280px; /* 로고와의 간격 조정 */
  }

  .input-wrapper, 
  input {
    width: 100% !important; /* 고정 너비 해제 */
    margin-left: 0; /* 마진 초기화 */
  }

  label {
    margin-left: 20px; /* 라벨 여백 조정 */
    width: 60px;
  }

  .remember-wrapper {
    margin-left: 80px; /* 태블릿 환경 라벨 위치에 맞춤 */
  }
}

/* ============================================
   스마트폰 전용 반응형 (최대 480px)
   ============================================ */
@media screen and (max-width: 480px) {
  .logo-wrapper {
    top: 125px;
  }

  .logo-img {
    width: 90%; /* 로고 너비를 화면에 맞게 조절 */
    height: 55px; /* 비율 유지 */
  }

  .login-container {
    margin-top: 180px;
    padding: 0 20px;
  }

  .login-field {
    flex-direction: column; /* 라벨과 입력창을 세로로 배치 */
    align-items: flex-start;
  }

  label {
    margin-left: 0;
    margin-bottom: 8px;
    width: 100%;
  }

  .input-wrapper {
    width: 100%;
  }

  input {
    width: 100% !important;
    margin-left: 0;
  }

  /* 버튼을 가로로 두 개 배치하기 좁으므로 세로로 변경 */
  .login-button {
    width: 100%;
    margin: 10px 0 0 0;
  }
  
  .clear-btn {
    right: 15px; /* X 버튼 위치 미세 조정 */
  }

  .remember-wrapper {
    margin-left: 0; /* 모바일에서는 왼쪽 끝 정렬 */
  }
  .remember-label {
    margin-bottom: 0 !important; /* 모바일 라벨 하단 여백 제거 */
  }
}