/* 三端共用的请求、账号、搜索与打印交互。 */
.checkout-preview-total {
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.checkout-toggle {
  gap: 6px;
}
.checkout-toggle > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkout-toggle input[type="checkbox"] {
  width: auto;
  accent-color: var(--green);
}
.checkout-toggle small,
[data-negotiated-field] small {
  color: #687a70;
  font-size: 12px;
  line-height: 1.6;
}
.checkout-amount-summary {
  background: #edf5ef;
  padding: 14px 16px;
  border-radius: 8px;
}
.checkout-amount-summary > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.checkout-amount-summary strong {
  color: var(--green);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.checkout-amount-summary small {
  font-size: 12px;
  color: #687a70;
}
.checkout-validation {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff1ee;
  color: #a33e32;
  font-size: 12px;
  line-height: 1.6;
}
.checkout-footer-total {
  margin-right: auto;
  min-width: 100px;
}
.checkout-footer-total small {
  display: block;
  color: #687a70;
  margin-bottom: 3px;
  font-size: 11px;
}
.checkout-footer-total strong {
  color: var(--green);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
  .checkout-footer-total {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .checkout-footer-total small {
    margin: 0;
  }
}

.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  min-width: 90px;
  opacity: 0.8 !important;
}
.is-loading > * {
  visibility: hidden;
}
.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 17px;
  height: 17px;
  border: 2px solid #175b4d;
  border-top-color: transparent;
  border-radius: 50%;
  animation: request-spin 0.8s linear infinite;
}
.primary.is-loading::after {
  border-color: #fff;
  border-top-color: transparent;
}
@keyframes request-spin {
  to {
    transform: rotate(360deg);
  }
}
.char-count {
  display: block;
  align-self: flex-end;
  text-align: right;
  font-size: 12px;
  color: #687a70;
  font-variant-numeric: tabular-nums;
}
.char-count.at-limit {
  color: #b45309;
}
.toast-action {
  margin-left: 16px;
  border: 1px solid #ffffff90;
  border-radius: 6px;
  padding: 5px 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#toast,
#admin-toast {
  z-index: 500;
  display: flex;
  align-items: center;
}
#toast.show,
#admin-toast.show {
  pointer-events: auto;
}
.account-profile {
  text-align: center;
  padding: 0 0 24px;
}
.account-profile .account-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: #edf5ef;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px #175b4d20;
  color: #175b4d;
  font-size: 28px;
  border-radius: 50%;
}
.account-profile h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.account-profile p {
  color: #687a70;
  font-size: 13px;
  margin-top: 8px;
}
.account-menu {
  display: grid;
  gap: 10px;
}
.account-menu .account-item {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 16px;
  border: 1px solid #e6ebe7;
  border-radius: 12px;
  background: #fff;
  color: #243b33;
  text-align: left;
  transition:
    background 0.15s,
    transform 0.15s;
}
.account-menu .account-item:hover {
  background: #f5f7f5;
  transform: translateX(2px);
}
.account-item .account-item-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  background: #edf5ef;
  border-radius: 10px;
  color: #175b4d;
}
.account-item strong,
.account-item small {
  display: block;
}
.account-item small {
  margin-top: 4px;
  font-size: 12px;
  color: #687a70;
}
.account-item.danger {
  color: #b33e37;
}
.account-item.danger .account-item-icon {
  background: #fff1ef;
  color: #b33e37;
}
.modal:has(.account-profile) {
  max-width: 420px;
  border-radius: 20px;
}
.modal:has(.account-profile) .modal-head {
  border: 0;
  padding-bottom: 12px;
}
.modal:has(.account-profile) .modal-head p {
  display: none;
}
.search-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0 18px;
  font-size: 12px;
  color: #687a70;
}
.search-suggestions button {
  border: 1px solid #e6ebe7;
  border-radius: 20px;
  background: #fff;
  padding: 6px 10px;
  cursor: pointer;
  color: #495a52;
}
.search-suggestions button:hover {
  background: #edf5ef;
  color: #175b4d;
}
.search-suggestions .clear-history {
  border: 0;
  background: transparent;
  text-decoration: underline;
}
.print-preview {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: #f1f3f1;
  display: flex;
  flex-direction: column;
}
.print-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid #dce3dc;
  background: #fff;
}
.print-preview-bar h2 {
  font-size: 16px;
}
.print-preview-bar p {
  color: #687a70;
  margin-top: 4px;
  font-size: 12px;
}
.print-preview-actions {
  display: flex;
  gap: 10px;
}
.print-preview iframe {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #fff;
}
@media (max-width: 760px) {
  .account-menu .account-item {
    padding: 13px;
  }
  .print-preview-bar {
    padding: 12px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-loading::after {
    animation: none;
    border-style: dotted;
  }
  .account-menu .account-item:hover {
    transform: none;
  }
}
