/* ========================================
   WooCommerce Login & Register Page
   File: assets/css/custom-login.css
   Simple, Modern & Attractive Design
   ======================================== */

/* Login Page Container */
.woocommerce-account .woocommerce {
  max-width: 100% !important;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
  padding: 0 20px;
}

/* Form Wrapper - Login, Register & Lost Password */
.woocommerce-form-login-toggle,
.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-ResetPassword {
  background: white;
  border-radius: 20px !important;
  padding: 20px 30px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 380px;
  min-width: 270px;
  width: auto;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease;
}

.woocommerce-ResetPassword.lost_reset_password {
  max-width: 320px;
}

/* Logo/Icon di atas form */
/* .woocommerce-form-login::before,
.woocommerce-form-register::before,
.woocommerce-ResetPassword::before {
  content: "🔐️";
  display: block;
  text-align: center;
  font-size: 45px;
  margin-bottom: 0px;
} */

/* style pakai logo image */

.woocommerce-form-login::before,
.woocommerce-form-register::before,
.woocommerce-ResetPassword::before {
    content: "";
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: url('/wp-content/themes/hallo-built/assets/images/i.a-logo.webp') center/contain no-repeat;
}


/* Login/Register/Lost Password Title */
.woocommerce-form-login h2,
.woocommerce-form-register h2,
.woocommerce-ResetPassword h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #333;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  margin-top: 0;
}

/* Subtitle / Info Text */
.woocommerce-form-login > p:first-of-type,
.woocommerce-form-register > p:first-of-type,
.woocommerce-ResetPassword > p:first-of-type {
  color: #666;
  font-size: 14px;
  text-align: center;
  margin-bottom: 3px;
  margin-top: 0;
  line-height: 1.6;
}

.woocommerce form.login {
  margin: 0;
}
/* Register/Login Link di subtitle */
.woocommerce-form-login > p:first-of-type a,
.woocommerce-form-register > p:first-of-type a,
.woocommerce-ResetPassword > p:first-of-type a {
  color: #42d3ce;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}

.woocommerce-form-login > p:first-of-type a:hover,
.woocommerce-ResetPassword > p:first-of-type a:hover {
  color: #008051;
}

/* Form Row */
.woocommerce-form-row {
  margin-bottom: 18px;
}

/* Labels */
.woocommerce-form__label,
.woocommerce-form-login label:not(.woocommerce-form__label-for-checkbox),
.woocommerce-form-register label:not(.woocommerce-form__label-for-checkbox),
.woocommerce-ResetPassword label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin-bottom: 0px !important;
}

/* Input Fields */
.woocommerce-Input,
.woocommerce-form-login input[type="text"],
.woocommerce-form-login input[type="email"],
.woocommerce-form-login input[type="password"],
.woocommerce-form-register input[type="text"],
.woocommerce-form-register input[type="email"],
.woocommerce-form-register input[type="password"],
.woocommerce-ResetPassword input[type="text"],
.woocommerce-ResetPassword input[type="email"] {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #f8f9fa;
  box-sizing: border-box;
}

.woocommerce-Input:focus,
.woocommerce-form-login input:focus,
.woocommerce-form-register input:focus,
.woocommerce-ResetPassword input:focus {
  outline: none;
  border-color: #42d3ce;
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 128, 81, 0.1);
}

/* Placeholder styling */
.woocommerce-Input::placeholder,
input::placeholder {
  color: #999;
}

/* Remember Me Checkbox */
.woocommerce-form__label-for-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-weight: 400 !important;
}

.woocommerce-form__input-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #42d3ce;
  margin: 0;
}

/* Login/Register/Reset Password Button */
.woocommerce-button,
.woocommerce-form-login__submit,
.woocommerce-form-register__submit,
.woocommerce-ResetPassword button[type="submit"],
button[name="login"],
button[name="register"] {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #42d3ce 0%, #008051 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  text-transform: none;
}

.woocommerce-button:hover,
.woocommerce-form-login__submit:hover,
.woocommerce-form-register__submit:hover,
.woocommerce-ResetPassword button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(66, 211, 206, 0.5);
}

.woocommerce-button:active,
.woocommerce-ResetPassword button[type="submit"]:active {
  transform: translateY(0);
}

/* Lost Password Link */
p.woocommerce-form-row.woocommerce-form-row--first.form-row.form-row-first {
  width: 100%;
}

.woocommerce-LostPassword {
  text-align: center;
  margin-top: 18px;
}

.woocommerce-LostPassword a {
  color: #42d3ce;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.woocommerce-LostPassword a:hover {
  color: #008051;
  text-decoration: underline;
}

/* Back to Login Link (di halaman Lost Password) */
.woocommerce-ResetPassword .woocommerce-LostPassword,
.woocommerce-ResetPassword > p:last-of-type {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.woocommerce-ResetPassword .woocommerce-LostPassword a,
.woocommerce-ResetPassword > p:last-of-type a {
  color: #42d3ce;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.woocommerce-ResetPassword .woocommerce-LostPassword a:hover,
.woocommerce-ResetPassword > p:last-of-type a:hover {
  color: #008051;
  text-decoration: underline;
}

/* Icon arrow untuk back link */
.woocommerce-ResetPassword .woocommerce-LostPassword a::before,
.woocommerce-ResetPassword > p:last-of-type a::before {
  content: "← ";
  font-size: 16px;
}

/* Privacy Policy Link */
.woocommerce-privacy-policy-text {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 20px;
}

.woocommerce-privacy-policy-text a {
  color: #42d3ce;
  text-decoration: none;
}

.woocommerce-privacy-policy-text a:hover {
  text-decoration: underline;
}

/* Required Asterisk */
.required {
  color: #e74c3c;
  margin-left: 2px;
}

/* Error/Info/Success Messages */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  background: #fee;
  border-left: 4px solid #e74c3c;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.woocommerce-error li,
.woocommerce-info li,
.woocommerce-message li {
  list-style: none;
}

.woocommerce-info {
  background: #e7f3ff;
  border-left-color: #2196f3;
}

.woocommerce-message {
  background: #eaffea;
  border-left-color: #4caf50;
}

/* Success message untuk password reset */
.woocommerce-ResetPassword .woocommerce-message {
  text-align: center;
  font-weight: 500;
}

/* Form Toggle Text */
.woocommerce-form-login-toggle {
  text-align: center;
  padding: 30px;
  background: transparent;
  box-shadow: none;
}

.woocommerce-form-login-toggle .woocommerce-info {
  background: white;
  border: 2px solid #42d3ce;
  border-radius: 12px;
  border-left-width: 2px;
}

.woocommerce-form-login-toggle a.showlogin,
.woocommerce-form-login-toggle a.showcoupon {
  color: #42d3ce;
  font-weight: 600;
  text-decoration: none;
}

/* ========================================
   SITE TITLE LINK DI BAWAH FORM LOGIN
   ======================================== */
.login-site-title {
  text-align: center;
  margin-top: 20px;
  padding: 0 30px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.login-site-title a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #42d3ce;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: rgba(66, 211, 206, 0.05);
}

.login-site-title a:hover {
  background: rgba(66, 211, 206, 0.15);
  color: #008051;
  transform: translateY(-2px);
}

.login-site-title a i {
  font-size: 15px;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading State */
.woocommerce-form-login.processing,
.woocommerce-form-register.processing,
.woocommerce-ResetPassword.processing {
  opacity: 0.6;
  pointer-events: none;
}

.woocommerce-form-login.processing::after,
.woocommerce-form-register.processing::after,
.woocommerce-ResetPassword.processing::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #f3f3f3;
  border-top-color: #42d3ce;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */
@media (max-width: 576px) {
  .woocommerce-form-login,
  .woocommerce-form-register,
  .woocommerce-ResetPassword {
    padding: 35px 25px;
    border-radius: 15px;
  }

  .woocommerce-form-login::before,
  .woocommerce-form-register::before,
  .woocommerce-ResetPassword::before {
    font-size: 40px;
    margin-bottom: 12px;
  }

  .woocommerce-form-login h2,
  .woocommerce-form-register h2,
  .woocommerce-ResetPassword h2 {
    font-size: 26px;
    margin-bottom: 6px;
  }

  .woocommerce-form-login > p:first-of-type,
  .woocommerce-form-register > p:first-of-type,
  .woocommerce-ResetPassword > p:first-of-type {
    margin-bottom: 12px;
  }

  .woocommerce-Input,
  .woocommerce-form-login input,
  .woocommerce-form-register input,
  .woocommerce-ResetPassword input {
    padding: 12px 16px;
    font-size: 14px;
  }

  .woocommerce-button,
  .woocommerce-form-login__submit,
  .woocommerce-form-register__submit,
  .woocommerce-ResetPassword button[type="submit"] {
    padding: 14px;
    font-size: 15px;
  }

  .woocommerce-form-row {
    margin-bottom: 15px;
  }

  .login-site-title {
    margin-top: 15px;
    padding: 0 20px;
  }

  .login-site-title a {
    font-size: 13px;
    padding: 8px 16px;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .woocommerce-account .woocommerce {
    padding: 0 15px;
  }

  .woocommerce-form-login,
  .woocommerce-form-register,
  .woocommerce-ResetPassword {
    padding: 30px 20px;
  }
}

/* Hide default WooCommerce styling */
.woocommerce .woocommerce-form-login .form-row,
.woocommerce .woocommerce-form-register .form-row,
.woocommerce .woocommerce-ResetPassword .form-row {
  padding: 0;
}

/* Ensure proper spacing */
.woocommerce-form-login .clear,
.woocommerce-form-register .clear,
.woocommerce-ResetPassword .clear {
  clear: both;
}

/* ========================================
   ADDITIONAL ENHANCEMENTS
   ======================================== */

/* Divider untuk "atau" */
.login-divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.login-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.login-divider span {
  background: white;
  padding: 0 15px;
  position: relative;
  color: #999;
  font-size: 13px;
}

/* Info box untuk instruksi */
.password-reset-info {
  background: #f0f7ff;
  border: 2px solid #d0e7ff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

/* Check email message styling */
.woocommerce-message.check-email {
  background: linear-gradient(135deg, #e7f3ff 0%, #d0e7ff 100%);
  border-left-color: #42d3ce;
  text-align: center;
  padding: 20px;
}

.woocommerce-message.check-email::before {
  content: "📧";
  display: block;
  font-size: 32px;
  margin-bottom: 10px;
}
