/* TPS shared “xanh gradient” (Hung pref): login CTA colors + darker hover.
   Reuse via CSS vars or .tps-btn-green-gradient anywhere on the site. */
:root {
  --tps-green-1: #22b873;
  --tps-green-2: #00a85a;
  --tps-green-3: #019650;
  --tps-green-hover-1: #00a85a;
  --tps-green-hover-2: #019650;
  --tps-green-hover-3: #008548;
}

.tps-btn-green-gradient {
  border: none !important;
  border-radius: 12px !important;
  background: linear-gradient(
    180deg,
    var(--tps-green-1) 0%,
    var(--tps-green-2) 50%,
    var(--tps-green-3) 100%
  ) !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06) !important;
  cursor: pointer;
  transition: background 0.15s ease, filter 0.15s ease;
}

.tps-btn-green-gradient:hover,
.tps-btn-green-gradient:focus {
  background: linear-gradient(
    180deg,
    var(--tps-green-hover-1) 0%,
    var(--tps-green-hover-2) 55%,
    var(--tps-green-hover-3) 100%
  ) !important;
  color: #fff !important;
  filter: brightness(0.97);
}

/* TPS Long Châu–style guest login/register modal. Shop green #008b4b. */
body.tps-auth-modal-open,
body.tps-auth-open,
html.tps-auth-modal-open,
html.tps-auth-open {
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

/* While modal open: block pointer events to everything behind the scrim */
body.tps-auth-modal-open > *:not(#tps-auth-scrim),
body.tps-auth-open > *:not(#tps-auth-scrim) {
  pointer-events: none !important;
}

/* Explicitly disable Flatsome sticky header / chrome (z-index often 99999–100000) */
body.tps-auth-modal-open #header,
body.tps-auth-modal-open #header.has-sticky,
body.tps-auth-modal-open .header,
body.tps-auth-modal-open .header.has-sticky,
body.tps-auth-modal-open .header-wrapper,
body.tps-auth-modal-open .header-wrapper.stuck,
body.tps-auth-modal-open #masthead,
body.tps-auth-modal-open #top-bar,
body.tps-auth-modal-open #wrapper,
body.tps-auth-modal-open #main,
body.tps-auth-modal-open #content,
body.tps-auth-modal-open .sticky-wrapper,
body.tps-auth-modal-open .mobile-sidebar,
body.tps-auth-modal-open #main-menu,
body.tps-auth-modal-open .off-canvas,
body.tps-auth-modal-open .mfp-wrap,
body.tps-auth-open #header,
body.tps-auth-open #header.has-sticky,
body.tps-auth-open .header,
body.tps-auth-open .header.has-sticky,
body.tps-auth-open .header-wrapper,
body.tps-auth-open .header-wrapper.stuck,
body.tps-auth-open #masthead,
body.tps-auth-open #top-bar,
body.tps-auth-open #wrapper,
body.tps-auth-open #main,
body.tps-auth-open #content,
body.tps-auth-open .sticky-wrapper,
body.tps-auth-open .mobile-sidebar,
body.tps-auth-open #main-menu,
body.tps-auth-open .off-canvas,
body.tps-auth-open .mfp-wrap {
  pointer-events: none !important;
  z-index: 1 !important;
}

.tps-auth-scrim {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  /* Beat Flatsome sticky (~100000) and most overlays */
  z-index: 2147483646 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box !important;
  background: rgba(15, 23, 20, 0.52);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  pointer-events: none;
  touch-action: none;
  isolation: isolate;
}

.tps-auth-scrim.is-open {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.tps-auth-scrim.is-open .tps-auth-modal {
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}

.tps-auth-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(92vh, 760px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  font-family: "Be Vietnam Pro", Montserrat, sans-serif;
}

.tps-auth-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #222;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.tps-auth-modal-close:hover,
.tps-auth-modal-close:focus {
  background: #f3f5f4;
  color: #000;
  outline: none;
}

.tps-auth-modal-close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.tps-auth-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 28px 28px 8px;
  -webkit-overflow-scrolling: touch;
}

.tps-auth-modal-heading {
  margin: 8px 0 6px !important;
  /* Equal L/R padding clears absolute close btn without shifting title off-center */
  padding: 0 36px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  font-family: "Be Vietnam Pro", Montserrat, sans-serif !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: none !important;
  color: #111 !important;
}

.tps-auth-modal-sub {
  margin: 0 0 18px;
  padding: 0 36px;
  box-sizing: border-box;
  width: 100%;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 400;
  text-align: center;
  color: #6b7280;
}

.tps-auth-modal .tps-auth-tabs {
  list-style: none;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 48px;
  border-bottom: 1px solid #eee;
  margin: 0 0 18px;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
}

.tps-auth-modal .tps-auth-tabs li {
  flex: 1;
  text-align: center;
  position: relative;
  margin: 0;
}

.tps-auth-modal .tps-auth-tabs li a {
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  font-family: "Be Vietnam Pro", Montserrat, sans-serif;
  font-size: 15px;
  line-height: 22px;
  color: #000;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
}

.tps-auth-modal .tps-auth-tabs li.active:before {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  bottom: -1px;
  background: #008b4b;
}

.tps-auth-modal .tps-auth-tabs li.active a,
.tps-auth-modal .tps-auth-tabs li a:hover {
  color: #008b4b;
}

/* Stack panels so login/register share the same height (no jump on tab switch). */
.tps-auth-modal .tps-auth-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.tps-auth-modal .tps-auth-panel {
  grid-area: 1 / 1;
  display: block;
  margin: 0;
  padding: 0;
  min-height: 360px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.tps-auth-modal .tps-auth-panel.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

/* Centered form column (~300px) — even spacing between inputs / checkbox / CTA */
.tps-auth-modal form.woocommerce-form {
  margin: 0 auto;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Member benefits: group centered in modal; icons+text left-aligned evenly inside. */
.tps-auth-modal .tps-auth-benefits-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 14px 0 6px;
  padding: 0;
  box-sizing: border-box;
}

.tps-auth-modal .tps-auth-benefits {
  list-style: none;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 12px 14px 10px;
  border-radius: 10px;
  background: #f3faf6;
  border: 1px solid #d9efe3;
  text-align: left;
}

.tps-auth-modal .tps-auth-benefits li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #1f2937;
  font-weight: 500;
  text-align: left;
}

.tps-auth-modal .tps-auth-benefits li:last-child {
  margin-bottom: 0;
}

.tps-auth-modal .tps-auth-benefit-ico {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 0;
  border-radius: 50%;
  background: #008b4b;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tps-auth-modal .tps-auth-benefit-ico svg {
  width: 13px;
  height: 13px;
  display: block;
}

.tps-auth-modal .tps-auth-benefit-txt {
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
}

.tps-auth-modal .tps-auth-benefit-txt a {
  color: #008b4b;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tps-auth-modal .tps-auth-benefit-txt a:hover {
  text-decoration: underline;
}

.tps-auth-modal .tps-auth-msg {
  display: none;
  margin: 0 auto 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

.tps-auth-modal .tps-auth-msg.is-error {
  display: block;
  background: #fdecec;
  color: #9b1c1c;
  border: 1px solid #f0b4b4;
}

.tps-auth-modal .tps-auth-msg.is-ok {
  display: block;
  background: #eef8f2;
  color: #0b5d34;
  border: 1px solid #bfe5cf;
}

.tps-auth-modal .woocommerce-form label,
.tps-auth-modal .woocommerce-privacy-policy-text,
.tps-auth-modal wc-order-attribution-inputs,
.tps-auth-modal .woocommerce-password-strength,
.tps-auth-modal .woocommerce-password-hint {
  display: none !important;
}

/* Remember-me: keep visible + straighten checkbox/label on one hàng */
.tps-auth-modal .woocommerce-form .woocommerce-form-login__rememberme {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 300px !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  color: #555 !important;
  margin: 5px 0 14px !important;
  padding: 0 !important;
  cursor: pointer;
}

.tps-auth-modal .woocommerce-form .woocommerce-form-login__rememberme input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  display: inline-block !important;
  position: relative !important;
  top: 0 !important;
  float: none !important;
  flex: 0 0 15px !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
  align-self: center !important;
  transform: translateY(0) !important;
  accent-color: #008b4b;
  cursor: pointer;
  box-sizing: border-box !important;
}

.tps-auth-modal .woocommerce-form .woocommerce-form-login__rememberme span {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

.tps-auth-modal .form-row,
.tps-auth-modal .tps-auth-field {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.tps-auth-modal input.input-text,
.tps-auth-modal input[type="text"],
.tps-auth-modal input[type="email"],
.tps-auth-modal input[type="tel"],
.tps-auth-modal input[type="password"] {
  width: 100% !important;
  max-width: 300px !important;
  height: 45px !important;
  border: 1px solid #b8bfba !important; /* darker gray than #e5e5e5 */
  border-radius: 8px !important;
  padding: 0 15px !important;
  font-family: Montserrat, "Be Vietnam Pro", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 45px !important; /* vertically center typed text + placeholder */
  background: #fff !important;
  box-shadow: none !important;
  margin: 0 0 12px !important;
  color: #222 !important;
  box-sizing: border-box !important;
}

/* Placeholders (login + register): Montserrat 14px, vertically centered */
.tps-auth-modal input.input-text::placeholder,
.tps-auth-modal input[type="text"]::placeholder,
.tps-auth-modal input[type="email"]::placeholder,
.tps-auth-modal input[type="tel"]::placeholder,
.tps-auth-modal input[type="password"]::placeholder {
  font-family: Montserrat, "Be Vietnam Pro", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 45px !important;
  letter-spacing: normal !important;
  color: #9ca3af !important;
  opacity: 1;
}
.tps-auth-modal input.input-text::-webkit-input-placeholder,
.tps-auth-modal input[type="text"]::-webkit-input-placeholder,
.tps-auth-modal input[type="email"]::-webkit-input-placeholder,
.tps-auth-modal input[type="tel"]::-webkit-input-placeholder,
.tps-auth-modal input[type="password"]::-webkit-input-placeholder {
  font-family: Montserrat, "Be Vietnam Pro", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 45px !important;
  letter-spacing: normal !important;
  color: #9ca3af !important;
  opacity: 1;
}
.tps-auth-modal input.input-text::-moz-placeholder,
.tps-auth-modal input[type="text"]::-moz-placeholder,
.tps-auth-modal input[type="email"]::-moz-placeholder,
.tps-auth-modal input[type="tel"]::-moz-placeholder,
.tps-auth-modal input[type="password"]::-moz-placeholder {
  font-family: Montserrat, "Be Vietnam Pro", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 45px !important;
  letter-spacing: normal !important;
  color: #9ca3af !important;
  opacity: 1;
}

.tps-auth-modal input.input-text:focus,
.tps-auth-modal input[type="text"]:focus,
.tps-auth-modal input[type="email"]:focus,
.tps-auth-modal input[type="tel"]:focus,
.tps-auth-modal input[type="password"]:focus {
  border-color: #008b4b !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 139, 75, 0.12) !important;
}

/* Password mask discs: same 14px as typed text (not 28px) */
.tps-auth-modal input[type="password"],
.tps-auth-modal .tps-pw-wrap > input[type="password"] {
  font-size: 14px !important;
  letter-spacing: 0.08em !important;
  font-family: Montserrat, "Be Vietnam Pro", sans-serif !important;
  font-weight: 500 !important;
  line-height: 45px !important;
}

/* Revealed password text matches other inputs */
.tps-auth-modal .tps-pw-wrap > input[type="text"] {
  font-family: Montserrat, "Be Vietnam Pro", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  line-height: 45px !important;
}

.tps-auth-modal .tps-pw-wrap {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 300px !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  box-sizing: border-box !important;
}

.tps-auth-modal .tps-pw-wrap > input.input-text,
.tps-auth-modal .tps-pw-wrap > input[type="password"],
.tps-auth-modal .tps-pw-wrap > input[type="text"] {
  display: block !important;
  width: 100% !important;
  max-width: 300px !important;
  height: 45px !important;
  box-sizing: border-box !important;
  padding: 0 44px 0 15px !important;
  margin: 0 !important;
  line-height: 45px !important;
}

.tps-auth-modal .tps-pw-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #666 !important;
  cursor: pointer;
}

.tps-auth-modal .tps-pw-toggle svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}


/* Field validation errors (email / phone) */
.tps-auth-modal input.input-text.is-invalid,
.tps-auth-modal input[type="text"].is-invalid,
.tps-auth-modal input[type="email"].is-invalid,
.tps-auth-modal input[type="tel"].is-invalid,
.tps-auth-modal input[type="password"].is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
  margin-bottom: 4px !important;
}

.tps-auth-modal .tps-field-error {
  display: block;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 500;
  color: #dc2626;
}

/* CTA: shared xanh gradient (vars / .tps-btn-green-gradient) */
.tps-auth-modal .woocommerce-button,
.tps-auth-modal button[type="submit"],
.tps-auth-modal .tps-btn-green-gradient {
  width: 100% !important;
  max-width: 300px !important;
  height: 45px !important;
  line-height: 45px !important;
  padding: 0 16px !important;
  border: none !important;
  border-radius: 12px !important;
  background: linear-gradient(
    180deg,
    var(--tps-green-1) 0%,
    var(--tps-green-2) 50%,
    var(--tps-green-3) 100%
  ) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06) !important;
  margin: 2px 0 0 !important;
  cursor: pointer;
  transition: background 0.15s ease, filter 0.15s ease;
}

.tps-auth-modal .woocommerce-button:hover,
.tps-auth-modal button[type="submit"]:hover,
.tps-auth-modal .tps-btn-green-gradient:hover {
  background: linear-gradient(
    180deg,
    var(--tps-green-hover-1) 0%,
    var(--tps-green-hover-2) 55%,
    var(--tps-green-hover-3) 100%
  ) !important;
  color: #fff !important;
  filter: brightness(0.97);
}

.tps-auth-modal .woocommerce-button:disabled,
.tps-auth-modal button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: wait;
}

.tps-auth-modal .lost_password,
.tps-auth-modal .lost_password a {
  display: block;
  text-align: center;
  font-size: 14px;
  color: #000;
  margin: 12px 0 4px;
  text-decoration: none;
  width: 100%;
  max-width: 300px;
}

.tps-auth-modal .lost_password a:hover,
.tps-auth-modal .lost_password a:focus {
  color: #000 !important;
  text-decoration: underline !important;
  font-weight: inherit !important;
  background: transparent !important;
}

.tps-auth-modal-art {
  position: relative;
  flex: 0 0 92px;
  height: 92px;
  overflow: hidden;
  background: #fff;
  pointer-events: none;
}

.tps-auth-modal-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: 0.2;
}

@media (max-width: 549px) {
  .tps-auth-modal {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 14px;
  }
  .tps-auth-modal-body {
    padding: 22px 18px 6px;
  }
  .tps-auth-modal-heading {
    font-size: 22px !important;
  }
  .tps-auth-modal-art {
    flex-basis: 72px;
    height: 72px;
  }
  .tps-auth-modal .tps-auth-panel {
    min-height: 340px;
  }
  .tps-auth-modal .tps-auth-benefits-wrap {
    margin: 12px 0 4px;
  }
  .tps-auth-modal .tps-auth-benefits {
    width: fit-content;
    max-width: 100%;
    padding: 10px 10px 8px;
  }
  .tps-auth-modal form.woocommerce-form,
  .tps-auth-modal .form-row,
  .tps-auth-modal .tps-pw-wrap,
  .tps-auth-modal .tps-auth-msg,
  .tps-auth-modal .lost_password {
    max-width: 300px;
  }
}
