/* 폰트 설정 */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap");

/* 로그인 페이지 전체 컨테이너 */
.ksl-login-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.ksl-login-container {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 48px 40px;
  text-align: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.ksl-login-logo {
  margin-bottom: 40px;
}

.ksl-login-logo img {
  max-width: 180px;
  height: auto;
}

.ksl-login-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.ksl-login-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 40px;
  line-height: 1.5;
}

/* 카카오 로그인 버튼 - googdae 스타일 */
.ksl-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  height: 48px;
  background: #fae64d;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  gap: 10px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.ksl-login-button:hover {
  background: #f9e041;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(250, 230, 77, 0.4);
}

.ksl-login-button:active {
  transform: translateY(0);
  background: #f7dc2e;
}

/* 카카오 아이콘 */
.ksl-kakao-icon {
  width: 22px;
  height: 22px;
  fill: #000000;
  flex-shrink: 0;
}

/* 버튼 텍스트 */
.ksl-login-button span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* 구분선 */
.ksl-divider {
  display: flex;
  align-items: center;
  margin: 32px 0;
  position: relative;
}

.ksl-divider::before,
.ksl-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.ksl-divider span {
  padding: 0 20px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
}

/* 추가 링크 */
.ksl-login-links {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.ksl-login-links a {
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.ksl-login-links a:hover {
  color: #374151;
  text-decoration: underline;
}

/* 일반 폼 래퍼 (기존 사이트용) */
.ksl-login-form-wrapper {
  text-align: center;
  margin: 20px 0;
}

/* 버튼 사이즈 옵션 */
.ksl-size-small {
  max-width: 280px;
  height: 40px;
  font-size: 14px;
}

.ksl-size-small .ksl-kakao-icon {
  width: 18px;
  height: 18px;
}

.ksl-size-medium {
  max-width: 380px;
  height: 48px;
  font-size: 16px;
}

.ksl-size-large {
  max-width: 100%;
  height: 56px;
  font-size: 18px;
}

.ksl-size-large .ksl-kakao-icon {
  width: 24px;
  height: 24px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .ksl-login-container {
    padding: 40px 24px;
  }

  .ksl-login-title {
    font-size: 24px;
  }

  .ksl-login-subtitle {
    font-size: 15px;
  }

  .ksl-login-button {
    max-width: 100%;
    height: 44px;
    font-size: 15px;
  }

  .ksl-size-medium {
    height: 44px;
  }
}

@media (max-width: 480px) {
  .ksl-login-container {
    padding: 32px 20px;
  }

  .ksl-login-button {
    max-width: 250px;
    height: 40px;
    font-size: 14px;
    border-radius: 8px;
  }

  .ksl-kakao-icon {
    width: 20px;
    height: 20px;
  }

  .ksl-login-logo img {
    max-width: 140px;
  }

  .ksl-size-medium {
    height: 40px;
  }
}

/* WordPress 로그인 페이지 통합 */
body.login .ksl-login-button {
  margin: 20px auto;
}

/* 로딩 상태 */
.ksl-login-button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.ksl-login-button.loading span {
  visibility: hidden;
}

.ksl-login-button.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #000;
  border-radius: 50%;
  border-top-color: transparent;
  animation: ksl-spin 0.8s linear infinite;
}

@keyframes ksl-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 에러 메시지 */
.ksl-error-message {
  background: #fee;
  color: #c00;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: left;
}

/* 성공 메시지 */
.ksl-success-message {
  background: #e6f7e6;
  color: #2e7d2e;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: left;
}

/* 기본 계정 로그인 폼 스타일 */
.ksl-wp-login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.ksl-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ksl-form-field label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.ksl-form-field input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ksl-form-field input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
  background: #ffffff;
}

.ksl-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
}

.ksl-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ksl-remember input {
  width: 16px;
  height: 16px;
}

.ksl-forgot {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

.ksl-forgot:hover {
  text-decoration: underline;
}

.ksl-form-submit button {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ksl-form-submit button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -16px rgba(79, 70, 229, 0.9);
}

.ksl-login-links {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
}

.ksl-login-links span {
  color: inherit;
}

.ksl-login-links a {
  color: #4f46e5;
  font-weight: 600;
}

.ksl-login-links a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .ksl-form-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Kakao login button sizing adjustments */
.ksl-login-button,
.ksl-login-button.loading {
  min-height: 52px;
  height: 52px;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 17px;
}

.ksl-size-medium {
  height: 52px;
}

.ksl-login-button.loading::after {
  width: 24px;
  height: 24px;
}

@media (max-width: 480px) {
  .ksl-login-button,
  .ksl-size-medium {
    min-height: 48px;
    height: 48px;
  }
}
