/* ========================================
   Login Page – Figma 登入頁 (node 155:931)
   ======================================== */

.login-main {
  margin-top: var(--header-height);
  position: relative;
  overflow: hidden;
  background: #3a3f3b;
}

.login-main__bg {
  position: absolute;
  top: 116px;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

.login-main__bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Hero gradient band ---------- */
.login-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 117px;
  overflow: hidden;
  flex-shrink: 0;
}

.login-hero__gradient {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ---------- Body ---------- */
.login-body {
  position: relative;
  z-index: 1;
  padding: 80px 12px 100px;
  min-height: calc(100vh - var(--header-height) - 117px);
}

/* ---------- Card ---------- */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 649px;
  margin: 0 auto;
  padding: 100px 70px 88px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.11);
}

.login-card__title {
  margin: 0 0 72px;
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #d77350;
}

/* ---------- Form ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-family: var(--font-primary);
}

body.woocommerce-account.login-page .login-form.woocommerce-form,
body.woocommerce-account.login-page .login-form.woocommerce-form-login,
body.woocommerce-account.login-page .login-form.login {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  max-width: none !important;
}

.login-form__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form__label {
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  color: #5a8a94;
}

.login-form__input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid #c3b49c;
  border-radius: 14px;
  background: #fcf9f4;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: #4a4a4a;
  outline: none;
  transition: border-color 0.2s ease;
}

.login-form__input::placeholder {
  color: #c8c8c8;
}

.login-form__input:focus {
  border-color: #5a8a94;
}

.login-form .show-password-input,
.login-form button.show-password-input {
  display: none !important;
}

.login-form__field--password {
  position: relative;
}

.login-form__field--password .login-form__options {
  margin-top: 18px;
}

.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-form__remember {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #d77350;
  white-space: nowrap;
}

.login-form__checkbox {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  accent-color: #5a8a94;
  flex-shrink: 0;
  vertical-align: middle;
}

.login-form__remember span {
  display: inline-block;
  line-height: 1;
}

.login-form__forgot {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #5c5c5c;
  white-space: nowrap;
}

.login-form__forgot:hover {
  opacity: 0.75;
}

.login-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-top: 24px !important;
  padding: 0 14px;
  border: none;
  border-radius: 100px !important;
  background-color: #5a8a94 !important;
  background-image: none !important;
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: #fff !important;
  cursor: pointer;
  transition: opacity 0.2s ease;
  overflow: hidden;
}

.login-form__submit:hover {
  opacity: 0.9;
}

/* ---------- Register link ---------- */
.login-card__register {
  margin: 14px 0 0;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #5c5c5c;
  text-align: left;
}

.login-card__register a {
  margin-left: 0;
  color: #d77350;
  text-decoration: underline;
  text-underline-position: from-font;
}

.login-card__register a:hover {
  opacity: 0.85;
}

/* ---------- Divider ---------- */
.login-card__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 36px 0 40px;
}

.login-card__divider img {
  display: block;
  width: min(150px, 24vw);
  height: 1px;
  object-fit: cover;
}

.login-card__divider span {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #5c5c5c;
  flex-shrink: 0;
}

/* ---------- Social buttons ---------- */
.login-card__social {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 18px;
}

.login-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 150px;
  min-width: 0;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: #4f4f4f;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-social-btn:hover {
  transform: translateY(-1px);
}

.login-social-btn span {
  white-space: nowrap;
}

.login-social-btn img {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ---------- WooCommerce overrides on login page ---------- */
body.woocommerce-account.login-page .site-main--default,
body.woocommerce-account.login-page .entry-content > .woocommerce > h2,
body.woocommerce-account.login-page .woocommerce-notices-wrapper:empty {
  display: none;
}

body.woocommerce-account.login-page .entry-content,
body.woocommerce-account.login-page .entry-content > .woocommerce {
  margin: 0;
  padding: 0;
  max-width: none;
}

body.woocommerce-account.login-page .login-form__submit.button,
body.woocommerce-account.login-page .woocommerce-form-login__submit {
  border-radius: 100px !important;
  min-height: 56px;
  margin-top: 24px !important;
  border: none !important;
  background-color: #5a8a94 !important;
  background-image: none !important;
  font-family: var(--font-primary) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #fff !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .login-card {
    padding: 40px 32px 48px;
  }

  .login-card__title {
    margin-bottom: 48px;
    font-size: 30px;
  }

  .login-form__label {
    font-size: 22px;
  }

  .login-form__input {
    height: 56px;
    font-size: 18px;
  }

  .login-form__submit {
    height: 56px;
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .login-main {
    background: #f6f1de;
  }

  .login-main::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 84px;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse at 103% 24%, rgba(229, 169, 73, 0.24) 0 24px, transparent 25px),
      radial-gradient(ellipse at -14% 46%, rgba(215, 115, 80, 0.12) 0 58px, transparent 60px),
      repeating-radial-gradient(ellipse at 52% 52%, transparent 0 34px, rgba(215, 115, 80, 0.22) 35px 36px, transparent 37px 70px);
    background-repeat: no-repeat;
    background-size: 100% 420px, 240px 320px, 760px 420px;
    background-position: center 0, left 160px, center 250px;
    opacity: 0.95;
  }

  .login-main__bg {
    display: block;
    top: 84px;
    bottom: 0;
    opacity: 0;
  }

  .login-hero {
    height: 48px;
    background: linear-gradient(89.99deg, rgba(229, 169, 73, 0.8) 2.08%, rgba(215, 115, 80, 0.2) 104.87%);
  }

  .login-hero__gradient {
    display: none;
  }

  .login-body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 36px 0 76px;
    min-height: calc(100vh - var(--header-height) - 48px);
  }

  .login-card {
    width: min(320px, calc(100vw - 40px));
    max-width: 320px;
    height: auto;
    min-height: 0;
    padding: 28px 30px 32px;
    border-radius: 16.938px;
    box-shadow: 0 0 6.572px rgba(0, 0, 0, 0.25);
  }

  .login-card__title {
    margin-bottom: 29px;
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
  }

  .login-form {
    gap: 12px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .login-form__field {
    gap: 4px;
  }

  .login-form__label {
    font-size: 16px;
    line-height: normal;
    color: #5a8a94;
  }

  .login-form__input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #c3b49c;
    border-radius: 8px;
    background: #fcf9f4;
    font-size: 14px;
    line-height: normal;
    color: #4c4c4c;
  }

  .login-form__input::placeholder {
    color: #c4c4c4;
  }

  .login-form__options {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
  }

  .login-form__field--password .login-form__options {
    margin-top: -4px;
  }

  .login-form__remember,
  .login-form__forgot {
    font-size: 12px;
    line-height: normal;
  }

  .login-form__remember {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    gap: 3.388px;
    white-space: nowrap;
    color: #d77350;
  }

  .login-form__checkbox {
    display: inline-block !important;
    width: 12px;
    height: 12px;
    border: 0.339px solid #d9d9d9;
    border-radius: 1.355px;
  }

  .login-form__remember span {
    display: inline-block !important;
    margin-left: 0;
  }

  .login-form__forgot {
    color: #4c4c4c;
  }

  .login-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    margin-top: 28px !important;
    padding: 0 14px 2px;
    font-size: 16px;
    line-height: 1;
  }

  body.woocommerce-account.login-page .login-form__submit.button,
  body.woocommerce-account.login-page .woocommerce-form-login__submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    margin-top: 28px !important;
    padding: 0 14px 2px !important;
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .login-card__register {
    margin-top: 8px;
    font-size: 12px;
    line-height: normal;
    text-align: left;
    color: #4c4c4c;
  }

  .login-card__divider {
    gap: 5px;
    margin: 21px 0 15px;
  }

  .login-card__divider img {
    width: 112px;
  }

  .login-card__divider span {
    font-size: 12px;
    line-height: normal;
    color: #4c4c4c;
  }

  .login-card__social {
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .login-social-btn {
    width: 100%;
    max-width: 246px;
    height: 24px;
    flex: 0 0 auto;
    gap: 3.388px;
    padding: 0 12px;
    font-size: 12px;
    line-height: normal;
    color: #000;
    box-shadow: 0 0 3.388px rgba(0, 0, 0, 0.25), 0 0 0.678px rgba(0, 0, 0, 0.25);
  }

  .login-social-btn img {
    width: 12px;
    height: 12px;
  }
}

/* 註冊表單：密碼寄送提示 */
.login-form__hint {
  margin: -2px 0 4px;
  font-size: 13px;
  line-height: 1.7;
  color: #8a8172;
}

/* ---------- 寄出重設信後的確認頁 ---------- */
.login-card--sent {
  text-align: center;
}

.login-sent__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #5a8a94;
}

.login-card--sent .login-card__title {
  margin-bottom: 16px;
}

.login-sent__text {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.85;
  color: #6b6256;
  margin: 0 0 26px;
  text-align: left;
}

.login-sent__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 52px;
  padding: 0 32px;
  border-radius: 999px;
  background: #5a8a94;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.login-sent__back:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .login-sent__icon {
    width: 52px;
    height: 52px;
  }
  .login-sent__text {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 20px;
  }
  .login-sent__back {
    min-width: 0;
    width: 100%;
    height: 44px;
    font-size: 15px;
  }
}

/* 登入/註冊/忘記密碼頁：通知訊息要讓開固定 header，並置中對齊卡片 */
body.login-page .woocommerce-notices-wrapper:not(:empty) {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 649px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 20px) 16px 0;
  box-sizing: border-box;
}

/* 有通知時，卡片改用較小的上距（避免和通知之間空太大） */
body.login-page .woocommerce-notices-wrapper:not(:empty) + .login-main {
  margin-top: 20px;
}

@media (max-width: 640px) {
  body.login-page .woocommerce-notices-wrapper:not(:empty) {
    max-width: min(360px, calc(100vw - 24px));
    padding-top: calc(var(--header-height) + 14px);
  }
}
