/* 联系我们 — PC */

.page-contact-us {
  background: var(--bg-h5);
}

.page-main--contact-us {
  padding-bottom: 80px;
}

.page-main--contact-us .container {
  box-sizing: border-box;
  max-width: 1128px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.contact-us-page {
  width: 100%;
}

.contact-us-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
}

.contact-us-section {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 49px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.contact-us-section__icon {
  flex-shrink: 0;
  display: block;
  filter: brightness(0) saturate(100%);
}

.contact-us-section__title {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--text-primary);
}

.contact-us-notice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--tag-bg);
}

.contact-us-notice__title {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--tag-red);
}

.contact-us-notice__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--tag-red);
}

.contact-us-card {
  padding: 12px;
  background: var(--bg-card);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.contact-us-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 448px;
}

.contact-us-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.contact-us-field__label {
  flex: 0 0 72px;
  padding-top: 5px;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.85);
  text-align: right;
}

.contact-us-field__label-pc::after {
  content: ":";
}

.contact-us-field__label-h5 {
  display: none;
}

.contact-us-field__control {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.contact-us-input,
.contact-us-dropdown__trigger,
.contact-us-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  background: var(--bg-card);
  color: #4b5563;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 22px;
  outline: none;
}

.contact-us-input,
.contact-us-dropdown__trigger {
  height: 32px;
  padding: 4px 11px;
}

.contact-us-input::placeholder,
.contact-us-textarea::placeholder {
  color: #bfbfbf;
}

.contact-us-input:focus,
.contact-us-dropdown__trigger:focus,
.contact-us-dropdown.is-open .contact-us-dropdown__trigger,
.contact-us-textarea:focus {
  border-color: #fa75b3;
}

.contact-us-dropdown {
  position: relative;
}

.contact-us-dropdown__trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 28px;
  text-align: left;
  cursor: pointer;
}

.contact-us-dropdown__trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 11px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(0, 0, 0, 0.25);
  transform: translateY(-25%);
  pointer-events: none;
}

.contact-us-dropdown.is-open .contact-us-dropdown__trigger::after {
  transform: translateY(-75%) rotate(180deg);
}

.contact-us-dropdown__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4b5563;
}

.contact-us-dropdown__value.is-placeholder {
  color: #bfbfbf;
}

.contact-us-dropdown__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow: auto;
  padding: 4px 0;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  background: var(--bg-card);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.contact-us-dropdown__panel[hidden] {
  display: none !important;
}

.contact-us-dropdown__item {
  display: block;
  width: 100%;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: #4b5563;
  font-family: inherit;
  font-size: 14px;
  line-height: 22px;
  text-align: left;
  cursor: pointer;
}

.contact-us-dropdown__item:hover,
.contact-us-dropdown__item.is-active {
  background: var(--tag-bg);
  color: var(--primary);
}

.contact-us-textarea {
  min-height: 98px;
  max-height: 142px;
  padding: 4px 11px;
  resize: vertical;
}

.contact-us-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 104px;
  height: 104px;
  border: 1px dashed #d9d9d9;
  border-radius: 2px;
  background: #fafafa;
  cursor: pointer;
  overflow: hidden;
}

.contact-us-upload__icon {
  position: relative;
  width: 14px;
  height: 14px;
}

.contact-us-upload__icon::before,
.contact-us-upload__icon::after {
  content: "";
  position: absolute;
  background: #4b5563;
  border-radius: 1px;
}

.contact-us-upload__icon::before {
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
}

.contact-us-upload__icon::after {
  top: 0;
  left: 6px;
  width: 2px;
  height: 14px;
}

.contact-us-upload__plus,
.contact-us-upload__text--h5 {
  display: none;
}

.contact-us-upload__text {
  font-size: 14px;
  line-height: 22px;
  color: #4b5563;
}

.contact-us-upload__preview {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact-us-upload__preview:not([src]) {
  opacity: 0;
}

.contact-us-upload:has(.contact-us-upload__preview:not([hidden])) .contact-us-upload__icon,
.contact-us-upload:has(.contact-us-upload__preview:not([hidden])) .contact-us-upload__plus,
.contact-us-upload:has(.contact-us-upload__preview:not([hidden])) .contact-us-upload__text {
  display: none;
}

.contact-us-form__error {
  display: none;
  margin: 0;
  width: 100%;
  color: #ef4444;
  font-size: 14px;
  line-height: 20px;
}

.contact-us-form__error.is-visible {
  display: block;
}

.contact-us-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.contact-us-submit {
  min-width: 88px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--primary);
  border-radius: 2px;
  background: var(--primary);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}

.contact-us-submit:hover {
  opacity: 0.92;
}

.contact-us--h5-only {
  display: none;
}

/* 联系我们 — H5 */

@media (max-width: 767px) {
  .page-contact-us {
    background: var(--bg-h5);
  }

  .page-contact-us .site-header,
  .page-contact-us .site-header-h5,
  .page-contact-us .h5-drawer,
  .page-contact-us .site-footer {
    display: none !important;
  }

  .contact-us--h5-only {
    display: flex;
  }

  .contact-us--pc-only {
    display: none !important;
  }

  .contact-us-h5-head {
    position: sticky;
    z-index: 11;
    top: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--bg-card);
  }

  .contact-us-h5-head__back {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }

  .contact-us-h5-head__title {
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: #292929;
    text-align: center;
  }

  .contact-us-h5-head__spacer {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 18px;
    visibility: hidden;
  }

  .page-main--contact-us {
    padding-bottom: 24px;
    background: var(--bg-h5);
  }

  .page-main--contact-us .container {
    max-width: none;
    padding: 0;
  }

  .contact-us-layout {
    gap: 0;
    padding: 0;
  }

  .contact-us-notice {
    margin: 0;
  }

  .contact-us-card {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .contact-us-form {
    gap: 16px;
    max-width: none;
    padding: 16px;
    background: var(--bg-card);
  }

  .contact-us-field {
    flex-direction: column;
    gap: 8px;
  }

  .contact-us-field__label {
    flex: none;
    padding-top: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-title);
    text-align: left;
  }

  .contact-us-field__label-pc {
    display: none;
  }

  .contact-us-field__label-h5 {
    display: inline;
  }

  .contact-us-input,
  .contact-us-dropdown__trigger,
  .contact-us-textarea {
    height: auto;
    min-height: 44px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #f3f4f6;
    color: var(--text-title);
    font-size: 14px;
    line-height: 1.4;
  }

  .contact-us-input::placeholder,
  .contact-us-textarea::placeholder {
    color: var(--text-placeholder);
  }

  .contact-us-input:focus,
  .contact-us-dropdown__trigger:focus,
  .contact-us-dropdown.is-open .contact-us-dropdown__trigger,
  .contact-us-textarea:focus {
    outline: 2px solid rgba(236, 72, 153, 0.2);
    outline-offset: 0;
    border-color: transparent;
  }

  .contact-us-dropdown__trigger {
    padding-right: 36px;
  }

  .contact-us-dropdown__trigger::after {
    content: "▾";
    right: 14px;
    width: auto;
    height: auto;
    border: none;
    font-size: 14px;
    line-height: 1;
    color: var(--text-placeholder);
    transform: translateY(-50%);
  }

  .contact-us-dropdown.is-open .contact-us-dropdown__trigger::after {
    transform: translateY(-50%) rotate(180deg);
  }

  .contact-us-dropdown__value {
    color: var(--text-title);
  }

  .contact-us-dropdown__value.is-placeholder {
    color: var(--text-placeholder);
  }

  .contact-us-dropdown__panel {
    top: calc(100% + 6px);
    border: none;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }

  .contact-us-dropdown__item {
    padding: 12px;
  }

  .contact-us-textarea {
    min-height: 140px;
    max-height: none;
  }

  .contact-us-upload {
    width: 100%;
    height: auto;
    min-height: 120px;
    padding: 24px;
    border: 0;
    outline: none;
    box-shadow: none;
    border-radius: 6px;
    background: #f3f4f6;
    gap: 8px;
  }

  .contact-us-upload:focus,
  .contact-us-upload:focus-within {
    outline: none;
    box-shadow: none;
  }

  .contact-us-upload__icon,
  .contact-us-upload__text--pc {
    display: none;
  }

  .contact-us-upload__plus {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: var(--text-placeholder);
  }

  .contact-us-upload__text--h5 {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-placeholder);
  }

  .contact-us-actions {
    padding-top: 0;
  }

  .contact-us-submit {
    width: 100%;
    height: auto;
    min-width: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: none;
  }
}
