/* 开通/充值共享结算布局
   Design read: 知识站支付面板 · variance 3 / motion 2 / density 7
   tokens: 白 panel / #f4f5f5 / 蓝 #1e73be ≤10% / radius 6 */

.pm-co-main {
  padding-top: 14px;
  padding-bottom: 24px;
}

.pm-co-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.pm-co-panel {
  border: 1px solid var(--pm-line, #e4e6eb);
  border-radius: var(--pm-radius, 6px);
  background: #fff;
  overflow: hidden;
}

.pm-co-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--pm-line-light, #f0f1f3);
  background: #fafbfc;
}

.pm-co-user > img {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--pm-blue-bg, #eaf2fb);
}

.pm-co-user__meta {
  min-width: 0;
  flex: 1;
}

.pm-co-user__meta strong {
  display: block;
  overflow: hidden;
  color: var(--pm-ink, #252933);
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-co-user__meta small {
  display: block;
  margin-top: 1px;
  color: var(--pm-muted, #8a919f);
  font-size: 11.5px;
}

.pm-co-user__link {
  flex: none;
  color: var(--pm-blue, #1e73be);
  font-size: 12.5px;
}

.pm-co-user__link:hover {
  text-decoration: underline;
}

.pm-co-body {
  padding: 20px;
}

.pm-co-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--pm-ink, #252933);
  font-size: 17px;
  font-weight: 700;
}

.pm-co-title span {
  color: var(--pm-muted, #8a919f);
  font-size: 12px;
  font-weight: 400;
}

.pm-co-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.pm-co-opt {
  position: relative;
  padding: 14px 12px 12px;
  border: 1px solid var(--pm-line, #e4e6eb);
  border-radius: var(--pm-radius, 6px);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.pm-co-opt:hover {
  border-color: #9fc3e4;
}

.pm-co-opt.is-active {
  border-color: var(--pm-blue, #1e73be);
  background: #f7fafd;
}

.pm-co-opt.is-active::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  border: 11px solid transparent;
  border-right-color: var(--pm-blue, #1e73be);
  border-bottom-color: var(--pm-blue, #1e73be);
  border-bottom-right-radius: 5px;
}

.pm-co-opt.is-active::before {
  content: '';
  position: absolute;
  right: 3px;
  bottom: 5px;
  z-index: 1;
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.pm-co-opt__hot {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--pm-amber, #b45309);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
}

.pm-co-opt__name {
  display: block;
  overflow: hidden;
  color: var(--pm-ink, #252933);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-co-opt__price {
  display: block;
  margin-top: 8px;
  color: #c0392b;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.pm-co-opt__price small {
  margin-right: 1px;
  font-size: 13px;
}

.pm-co-opt__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
  color: var(--pm-muted, #8a919f);
  font-size: 11.5px;
}

.pm-co-opt__sub del {
  color: var(--pm-muted, #8a919f);
}

.pm-co-opt__sub em {
  color: var(--pm-muted, #8a919f);
  font-style: normal;
}

.pm-co-opt.is-skeleton {
  min-height: 96px;
  cursor: default;
  pointer-events: none;
}

.pm-co-custom {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--pm-line, #e4e6eb);
  border-radius: var(--pm-radius, 6px);
  background: #fafbfc;
}

.pm-co-custom.is-active {
  border-color: var(--pm-blue, #1e73be);
  background: #f7fafd;
}

.pm-co-custom label {
  display: block;
  margin-bottom: 6px;
  color: var(--pm-text, #515767);
  font-size: 13px;
  font-weight: 600;
}

.pm-co-custom__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pm-co-custom__row span {
  color: var(--pm-muted, #8a919f);
  font-size: 13px;
}

.pm-co-custom input {
  width: 140px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--pm-line, #e4e6eb);
  border-radius: 4px;
  background: #fff;
  color: var(--pm-ink, #252933);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.pm-co-custom input:focus {
  border-color: var(--pm-blue, #1e73be);
}

.pm-co-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #dfeaf4;
  border-radius: var(--pm-radius, 6px);
  background: #f7fafd;
}

.pm-co-bar__info {
  min-width: 0;
}

.pm-co-bar__info p {
  margin: 0;
  color: var(--pm-text, #515767);
  font-size: 12.5px;
}

.pm-co-bar__info p strong {
  margin: 0 2px;
  color: var(--pm-ink, #252933);
}

.pm-co-bar__info small {
  display: block;
  margin-top: 3px;
  color: var(--pm-muted, #8a919f);
  font-size: 11.5px;
}

.pm-co-bar__pay {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
}

.pm-co-bar__amount {
  color: var(--pm-text, #515767);
  font-size: 12.5px;
}

.pm-co-bar__amount strong {
  margin-left: 2px;
  color: #c0392b;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pm-co-bar .but {
  min-width: 128px;
  min-height: 38px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.pm-co-bar .but:disabled {
  cursor: wait;
  opacity: 0.7;
}

.pm-co-side {
  margin-top: 14px;
  padding: 14px 20px;
  border: 1px solid var(--pm-line, #e4e6eb);
  border-radius: var(--pm-radius, 6px);
  background: #fff;
}

.pm-co-side h3 {
  margin: 0 0 8px;
  color: var(--pm-ink, #252933);
  font-size: 13px;
  font-weight: 600;
}

.pm-co-side ol,
.pm-co-side ul {
  margin: 0;
  padding-left: 18px;
  color: var(--pm-muted, #8a919f);
  font-size: 12px;
  line-height: 1.9;
}

.pm-co-side p {
  margin: 0 0 10px;
  color: var(--pm-text, #515767);
  font-size: 12.5px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .pm-co-main {
    padding-top: 10px;
  }

  .pm-co-user {
    padding: 10px 14px;
  }

  .pm-co-body {
    padding: 14px;
  }

  .pm-co-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pm-co-opt__price {
    font-size: 18px;
  }

  .pm-co-custom input {
    flex: 1;
    width: auto;
    min-width: 120px;
  }

  .pm-co-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .pm-co-bar__pay {
    justify-content: space-between;
  }

  .pm-co-bar .but {
    flex: 1;
  }

  .pm-co-side {
    padding: 14px;
  }
}

@media (max-width: 400px) {
  .pm-co-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-co-opt {
    transition: none;
  }
}
