/* WooCommerce 提示条 + 弹窗内表单 */
/* 顶部固定导航高度与 index.css header / phone.css .dian 一致，避免提示压在菜单上 */
.qidian-wc-notices:not(:empty) {
  max-width: 12rem;
  margin: var(--qidian-header-h) auto 0;
  padding: 0 0.42rem 0 0.2rem;
  position: relative;
  z-index: 10050;
  box-sizing: border-box;
}

/* 顶部提示条关闭按钮（由 index.js 注入） */
.qidian-wc-notice-dismiss {
  position: absolute;
  top: 0.08rem;
  right: 0.06rem;
  z-index: 2;
  width: 0.32rem;
  height: 0.32rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #444;
  font-size: 0.22rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qidian-wc-notice-dismiss:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #111;
}

.qidian-wc-notice-dismiss:focus {
  outline: 0.02rem solid #edbe47;
  outline-offset: 0.02rem;
}

/* 已有提示时不再重复 .dian 占位，避免标题区与内容之间出现双倍空白 */
.qidian-wc-notices:not(:empty) ~ .dian {
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
}

.qidian-wc-notices .woocommerce-error,
.qidian-wc-notices .woocommerce-message,
.qidian-wc-notices .woocommerce-info {
  margin: 0.1rem 0;
  list-style: none;
  padding: 0.14rem 0.18rem 0.14rem 0.52rem;
  font-size: 0.16rem;
  line-height: 1.55;
  border-radius: 0.08rem;
  box-sizing: border-box;
  box-shadow: 0 0.04rem 0.14rem rgba(0, 0, 0, 0.08);
}

/* 左侧 WooCommerce 字体图标（::before）与正文拉开距离，避免「错误」与感叹号叠在一起 */
.qidian-wc-notices .woocommerce-error::before,
.qidian-wc-notices .woocommerce-message::before,
.qidian-wc-notices .woocommerce-info::before {
  left: 0.14rem !important;
}

.qidian-wc-notices .woocommerce-error {
  background: #fff5f5 !important;
  border: 0.01rem solid #f0c4c4 !important;
  border-top: 0.03rem solid #c62828 !important;
  color: #5c2222 !important;
}

.qidian-wc-notices .woocommerce-error li {
  margin: 0;
  padding: 0;
}

/* WooCommerce Blocks：Store Notices 默认 1px #2f2f2f 边框，覆盖为与主题一致的柔和样式 */
.qidian-wc-notices .wc-block-components-notice-banner {
  border: 0.01rem solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 0.08rem !important;
  box-shadow: 0 0.04rem 0.14rem rgba(0, 0, 0, 0.08) !important;
  color: #5c2222 !important;
  font-size: 0.16rem !important;
  line-height: 1.55 !important;
  margin: 0.1rem 0 !important;
  padding: 0.12rem 0.16rem !important;
  gap: 0.22rem !important;
  align-items: flex-start !important;
}

.qidian-wc-notices .wc-block-components-notice-banner > .wc-block-components-notice-banner__content {
  padding-left: 0.08rem !important;
  padding-right: 0 !important;
  min-width: 0;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-error {
  background-color: #fff5f5 !important;
  border-color: #f0c4c4 !important;
  border-top: 0.03rem solid #c62828 !important;
  color: #5c2222 !important;
}

.qidian-wc-notices .wc-block-components-notice-banner > svg {
  flex-shrink: 0 !important;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-error > svg {
  background-color: #c62828 !important;
  fill: #fff !important;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-success {
  background-color: #f4fff4 !important;
  border-color: #b8e0b8 !important;
  border-top: 0.03rem solid #2e7d32 !important;
  color: #1b4d1e !important;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-success > svg {
  background-color: #2e7d32 !important;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-info {
  background-color: #f5f8ff !important;
  border-color: #c5d4f0 !important;
  border-top: 0.03rem solid #1565c0 !important;
  color: #1a3a5c !important;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-info > svg {
  background-color: #1565c0 !important;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-warning {
  background-color: #fffbf4 !important;
  border-color: rgba(240, 184, 73, 0.55) !important;
  border-top: 0.03rem solid #e6a01a !important;
  color: #5c4a22 !important;
}

.qidian-wc-notices .wc-block-components-notice-banner.is-warning > svg {
  background-color: #e6a01a !important;
}

.qidian-wc-notices .woocommerce-message {
  background: #f4fff4 !important;
  border: 0.01rem solid #b8e0b8 !important;
  border-top: 0.03rem solid #2e7d32 !important;
  color: #1b4d1e !important;
}

.qidian-wc-notices .woocommerce-info {
  background: #f5f8ff !important;
  border: 0.01rem solid #c5d4f0 !important;
  border-top: 0.03rem solid #1565c0 !important;
  color: #1a3a5c !important;
}

@media screen and (min-width: 320px) and (max-width: 1024px) {
  .qidian-wc-notices:not(:empty) {
    margin-top: 1.4rem;
  }
}

.qidian-wc-auth .qidian-wc-auth-msg {
  font-size: 0.18rem;
  color: #666;
  line-height: 1.6;
  padding: 0.2rem 0;
}

.qidian-wc-auth .qidian-wc-auth-link {
  color: #edbe47;
}

.qidian-wc-auth .qidian-wc-hint {
  font-size: 0.14rem;
  color: #888;
  margin: 0 0 0.15rem;
}

.qidian-wc-auth .woocommerce-privacy-policy-text {
  font-size: 0.14rem;
  margin: 0.1rem 0;
}

.qidian-wc-auth .woocommerce-privacy-policy-text + p,
.qidian-wc-auth p.form-row {
  margin: 0.1rem 0;
}

.qidian-wc-login-meta {
  margin: 0.08rem 0 0.12rem;
}

.qidian-wc-lost-password {
  margin-top: 0.15rem;
  font-size: 0.14rem;
}

.qidian-wc-lost-password a {
  color: #edbe47;
}

/* WC 在弹窗里追加的字段与主题对齐 */
.qidian-wc-auth .woocommerce-form-row {
  margin: 0 0 0.12rem;
}

.qidian-wc-auth .woocommerce-form-row label {
  display: block;
  font-size: 0.14rem;
  margin-bottom: 0.04rem;
}

.qidian-wc-auth .woocommerce-form-row .input-text {
  width: 100%;
  box-sizing: border-box;
}

/* 注册弹窗：一屏展示（桌面） */
.register-form-popup .form-popup-content {
  max-height: 95vh;
  height: min(8.4rem, 95vh);
  min-height: 0;
}

.register-form-popup .form-popup-body {
  margin: 0.22rem;
  align-items: stretch;
}

.register-form-popup .form-popup-right.qidian-wc-auth {
  padding-top: 0.3rem;
  padding-bottom: 0.24rem;
  overflow-y: hidden;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-popup-header {
  padding-top: 0.08rem;
  padding-bottom: 0.14rem;
  margin-bottom: 0.14rem;
}

.register-form-popup .form-popup-right.qidian-wc-auth .register-form {
  gap: 0.12rem;
  justify-content: flex-start;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-row {
  height: auto;
  gap: 0.1rem;
  margin-bottom: 0.14rem;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-hint {
  font-size: 0.12rem;
  top: calc(100% + 0.02rem);
  line-height: 1.2;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-checkbox-group {
  margin: 0.08rem 0 0.06rem;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-submit-btn {
  margin-top: 0.12rem;
  height: 0.58rem;
}

/* 该段是 Woo 默认注入的英文隐私说明，静态页无此段，隐藏以避免超屏 */
.register-form-popup .form-popup-right.qidian-wc-auth .woocommerce-privacy-policy-text {
  display: none;
}

/* 进一步贴近静态页：压缩输入控件高度和分组边距 */
.register-form-popup .form-popup-right.qidian-wc-auth .form-group {
  min-height: 0.48rem;
}

/* 给“生日”这一列预留提示文案空间，避免与下一行（邮箱）重叠 */
.register-form-popup .form-popup-right.qidian-wc-auth .form-row .form-group-half:first-child {
  padding-bottom: 0.14rem;
}

/* 该提示仅为装饰文案，先隐藏可确保弹窗一屏稳定展示 */
.register-form-popup .form-popup-right.qidian-wc-auth .form-hint {
  display: none;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-row {
  margin-bottom: 0.12rem;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-row .form-group-half:first-child {
  padding-bottom: 0;
}

.register-form-popup .form-popup-right.qidian-wc-auth .form-input,
.register-form-popup .form-popup-right.qidian-wc-auth .form-select,
.register-form-popup .form-popup-right.qidian-wc-auth .form-date {
  height: 0.45rem;
  font-size: 0.2rem;
}

/* 贴近静态页比例：左图略窄，右侧表单更宽，保证字段与按钮同屏 */
.register-form-popup .form-popup-left {
  width: 48%;
}

.register-form-popup .form-popup-right {
  width: 52%;
}

.register-form-popup .form-popup-left,
.register-form-popup .form-popup-right {
  min-height: 0;
}

/* 手机端：注册/登录弹窗改为单列布局，避免图片与表单错位重叠 */
@media screen and (max-width: 1024px) {
  .register-form-popup .form-popup-content,
  .login-form-popup .form-popup-content {
    width: 92vw;
    max-width: 92vw;
    height: auto;
    max-height: 92vh;
    border-radius: 0.14rem;
  }

  .register-form-popup .form-popup-close,
  .login-form-popup .form-popup-close {
    top: 0.08rem;
    right: 0.12rem;
    color: #fff;
  }

  .register-form-popup .form-popup-body,
  .login-form-popup .form-popup-body {
    margin: 0.12rem;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
  }

  .register-form-popup .form-popup-left,
  .login-form-popup .form-popup-left {
    width: 100%;
    height: 2.2rem;
    padding: 0;
    border-radius: 0.08rem 0.08rem 0 0;
    overflow: hidden;
    background: #fff;
  }

  .register-form-popup .form-popup-left img,
  .login-form-popup .form-popup-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .register-form-popup .form-popup-right,
  .login-form-popup .form-popup-right {
    width: 100%;
    padding: 0.16rem 0.14rem 0.18rem;
    border-radius: 0 0 0.08rem 0.08rem;
    overflow-y: auto;
  }

  .register-form-popup .form-popup-right.qidian-wc-auth .form-popup-header,
  .login-form-popup .form-popup-right.qidian-wc-auth .form-popup-header {
    padding: 0 0 0.1rem;
    margin-bottom: 0.1rem;
  }

  .register-form-popup .form-popup-right.qidian-wc-auth .form-input,
  .register-form-popup .form-popup-right.qidian-wc-auth .form-select,
  .register-form-popup .form-popup-right.qidian-wc-auth .form-date,
  .login-form-popup .form-popup-right.qidian-wc-auth .form-input,
  .login-form-popup .form-popup-right.qidian-wc-auth .form-select,
  .login-form-popup .form-popup-right.qidian-wc-auth .form-date {
    height: 0.44rem;
    font-size: 0.16rem;
  }

  .register-form-popup .form-popup-right.qidian-wc-auth .register-form,
  .login-form-popup .form-popup-right.qidian-wc-auth .register-form {
    gap: 0.08rem;
  }
}

/* 登录/注册：标签在上、输入框独立边框（参考简洁 LOGIN 布局） */
.qidian-wc-auth--refined .register-form {
  justify-content: flex-start;
  gap: 0.14rem;
}

.qidian-wc-auth--refined .form-group,
.qidian-wc-auth--refined .form-row .form-group {
  flex-direction: column;
  align-items: stretch;
  gap: 0.06rem;
  border-bottom: none;
  height: auto;
  min-height: 0;
  padding-bottom: 0;
}

.qidian-wc-auth--refined .qidian-auth-label {
  display: block;
  font-size: 0.14rem;
  font-weight: 600;
  color: #333;
  line-height: 1.35;
  margin: 0;
}

.qidian-wc-auth--refined .qidian-auth-label .required {
  color: #edbe47;
  font-weight: 700;
}

.qidian-wc-auth--refined .form-input,
.qidian-wc-auth--refined .form-select,
.qidian-wc-auth--refined .form-date {
  width: 100%;
  flex: none;
  height: 0.46rem;
  padding: 0 0.14rem;
  border: 0.01rem solid #dcdcdc;
  border-radius: 0.06rem;
  font-size: 0.15rem;
  color: #333;
  background: #fff;
}

.qidian-wc-auth--refined .form-input::placeholder {
  color: #999;
}

.qidian-wc-auth--refined .form-hint {
  margin: 0.04rem 0 0;
  font-size: 0.12rem;
  color: #888;
  line-height: 1.4;
}

.qidian-wc-auth--refined .form-hint::before {
  content: none;
}

.qidian-wc-auth--refined .qidian-auth-birth-gender {
  display: flex;
  gap: 0.14rem;
  align-items: stretch;
  height: auto;
}

.qidian-wc-auth--refined .qidian-birth-date-row {
  display: flex;
  align-items: center;
  gap: 0.06rem;
  width: 100%;
}

.qidian-wc-auth--refined .qidian-birth-date-row .qidian-birth-part {
  flex: 1;
  min-width: 0;
  padding-left: 0.08rem;
  padding-right: 0.08rem;
  text-align: center;
}

.qidian-wc-auth--refined .qidian-birth-sep {
  flex-shrink: 0;
  font-size: 0.14rem;
  color: #999;
  line-height: 1;
  user-select: none;
}

.qidian-wc-auth--refined .qidian-auth-birth-gender .form-group-half {
  flex: 1;
  min-width: 0;
}

.qidian-wc-auth--refined .qidian-auth-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.12rem;
  width: 100%;
}

.qidian-wc-auth--refined .qidian-wc-forgot-link {
  font-size: 0.13rem;
  color: #723fba;
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}

.qidian-wc-auth--refined .qidian-wc-forgot-link:hover {
  color: #5a2f9a;
}

.qidian-wc-auth--refined .qidian-auth-password-row .qidian-auth-field-head {
  margin-bottom: 0.02rem;
}

.qidian-wc-auth--refined .form-checkbox-group {
  margin-top: 0.06rem;
  align-items: flex-start;
}

.qidian-wc-auth--refined .form-checkbox-label {
  font-size: 0.13rem;
  line-height: 1.5;
  color: #555;
}

.qidian-wc-auth--refined .form-submit-btn {
  margin-top: 0.1rem;
  width: 100%;
  height: 0.5rem;
  border-radius: 0.06rem;
  font-size: 0.16rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background-color: #edbe48;
  color: #fff;
  border: none;
}

.qidian-wc-auth--refined .form-submit-btn:hover {
  background-color: #e3b413;
  color: #fff;
  opacity: 1;
}

.qidian-wc-auth--refined .form-popup-title {
  font-size: 0.28rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.qidian-wc-auth--refined .form-login-link {
  font-size: 0.13rem;
}

.qidian-wc-auth--refined .form-login-link span {
  font-size: 0.13rem;
}

.qidian-wc-auth--refined .qidian-wc-lost-password {
  display: none;
}

.qidian-wc-auth--refined .from-icon {
  display: none;
}
