[data-baans-auth] [hidden] {
  display: none !important;
}

/* Khung popup Elementor chứa form (08/10/2026). Trên điện thoại khung ngoài rộng 100vw - 24px (Custom CSS của
   popup) nhưng khung nội dung rộng tới 100vw, bị cắt 24px bên phải. Luật bỏ đệm 10px trong Custom CSS viết
   `> .e-con` nên không khớp phần tử nào; đặt lại ở đây theo nội dung, không phụ thuộc ID popup. */
.elementor-popup-modal .dialog-message:has([data-baans-auth]) {
  max-width: 100%;
}

.elementor-popup-modal .e-con:has([data-baans-auth]),
.elementor-popup-modal .e-con-inner:has([data-baans-auth]) {
  padding: 0;
  gap: 0;
}

/* Iframe nút Google rộng hơn ô chứa 20px và lùi lề -10px mỗi bên; luật `.elementor iframe { max-width: 100% }`
   của Elementor bóp nó lại, làm mất 20px mép phải của nút. */
[data-baans-auth] [data-google-button] iframe {
  max-width: none;
}

[data-baans-auth] .baans-auth-social-list {
  margin-top: 14px;
}

[data-baans-auth] .baans-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: #70827b;
  font-size: 12px;
  text-align: center;
}

[data-baans-auth] .baans-auth-divider::before,
[data-baans-auth] .baans-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dbe4df;
}

[data-baans-auth] .baans-auth-social {
  width: 100%;
  min-height: 46px;
  margin-top: 9px;
  border: 1px solid #ccd8d1;
  border-radius: 8px;
  background: #fff;
  color: #213b36;
  font: 600 14px/1.2 inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

[data-baans-auth] .baans-auth-social:hover:not(:disabled) {
  border-color: #7c6192;
  background: #faf8fc;
  transform: translateY(-1px);
}

[data-baans-auth] .baans-auth-social:disabled {
  cursor: not-allowed;
}

[data-baans-auth] .baans-auth-social-icon {
  display: inline-flex;
  width: 22px;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-weight: 800;
}

/* Nút Apple theo HIG "Creating a custom Sign in with Apple button": tệp logo cao bằng nút, không đệm dọc
   (tệp đã có sẵn khoảng trống trên dưới và khoảng cách tới chữ), logo và chữ cùng màu đen. */
[data-baans-auth] .baans-auth-social[data-auth-oauth="apple"] {
  padding-top: 0;
  padding-bottom: 0;
  color: #000;
}

[data-baans-auth] .baans-auth-social-icon--apple {
  width: auto;
  margin-right: 0;
}

[data-baans-auth] .baans-auth-social-icon--apple svg {
  display: block;
  width: calc(46px * 31 / 44);
  height: 46px;
}

[data-baans-auth] .baans-auth-social-icon--facebook {
  color: #1877f2;
  font-size: 20px;
}

[data-baans-auth] .baans-auth-email-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #dbe4df;
}

[data-baans-auth] .baans-auth-email-heading {
  margin-bottom: 14px;
  color: #213b36;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

[data-baans-auth] .baans-auth-email-form {
  display: grid;
  gap: 12px;
}

[data-baans-auth] .baans-auth-field {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #344b46;
  font-size: 13px;
  font-weight: 600;
}

[data-baans-auth] .baans-auth-field b {
  color: #c45151;
}

[data-baans-auth] .baans-auth-field input {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cbd7d1;
  border-radius: 7px;
  background: #fff;
  color: #19322d;
  font: 400 15px/1.3 inherit;
  box-shadow: none;
  outline: none;
}

[data-baans-auth] .baans-auth-field input:focus {
  border-color: #775c8e;
  box-shadow: 0 0 0 3px rgba(119, 92, 142, .13);
}

[data-baans-auth] .baans-auth-password-wrap {
  position: relative;
  display: block;
}

[data-baans-auth] .baans-auth-password-wrap input {
  padding-right: 60px;
}

[data-baans-auth] .baans-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 42px;
  padding: 5px 4px;
  border: 0;
  background: transparent;
  color: #6e5682;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-50%);
  cursor: pointer;
}

[data-baans-auth] .baans-auth-email-actions {
  margin-top: -4px;
  text-align: right;
}

[data-baans-auth] .baans-auth-text-button {
  padding: 2px;
  border: 0;
  background: transparent;
  color: #6f5088;
  font: 600 13px/1.4 inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

[data-baans-auth] .baans-auth-email-submit {
  min-height: 46px;
  margin-top: 2px;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  background: #785c8f;
  color: #fff;
  font: 700 14px/1.2 inherit;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

[data-baans-auth] .baans-auth-email-submit:hover:not(:disabled) {
  background: #634a79;
  transform: translateY(-1px);
}

[data-baans-auth] .baans-auth-email-submit:disabled {
  opacity: .65;
  cursor: wait;
}

[data-baans-auth] .baans-auth-mode-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 14px;
  color: #667771;
  font-size: 13px;
  text-align: center;
}

[data-baans-auth] [data-auth-status][data-error="true"] {
  color: #a33b3b !important;
}

@media (max-width: 767px) {
  [data-baans-auth] .baans-auth-email-panel {
    margin-top: 14px;
    padding-top: 14px;
  }

  [data-baans-auth] .baans-auth-email-heading {
    font-size: 16px;
  }

  [data-baans-auth] .baans-auth-field input,
  [data-baans-auth] .baans-auth-email-submit,
  [data-baans-auth] .baans-auth-social {
    min-height: 44px;
  }
}
