/*
 * HK-BEUP plan page member-discount polish v2
 * Scope: PricingPage1 only (`data-v-6b196619`).
 * Boundary: visual rhythm only; no plan text, price, period, feature, order, API, or database changes.
 *
 * Baseline: the non-member view is already clean. This patch keeps that
 * comfortable price-card rhythm, while tucking member metadata into the
 * top-left/top-right corners when it exists.
 */

#app .v-main :where(.v-row, .v-window, .v-window-item):has([data-v-6b196619]) {
  --beup-plan-primary: #4fa7b5;
  --beup-plan-primary-deep: #2f7f8e;
  --beup-plan-ink: #203442;
  --beup-plan-muted: #78909c;
}

/*
 * Only member-discount cards get touched. The normal no-member cards do not
 * contain `.discount-badge`, so their original height and visual rhythm remain.
 * The price card keeps the no-member breathing room; the extra member/original
 * price labels live in the top safe area instead of compressing the title,
 * price and CTA.
 */
#app .v-main .v-card:has(.discount-badge[data-v-6b196619]) .pa-6.rounded-md[data-v-6b196619] {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding-top: 42px !important;
  padding-bottom: 24px !important;
}

#app .v-main .v-card:has(.discount-badge[data-v-6b196619]) h1[data-v-6b196619] {
  margin-bottom: 8px !important;
  line-height: 1.22;
}

#app .v-main .v-card:has(.discount-badge[data-v-6b196619]) .price-container[data-v-6b196619] {
  display: grid;
  min-height: 52px;
  align-content: center;
  justify-items: center;
  gap: 0;
  margin-top: 0;
}

#app .v-main .discount-badge[data-v-6b196619] {
  position: absolute !important;
  top: 10px;
  right: 12px;
  z-index: 3;
  min-width: 112px;
  max-width: min(128px, calc(100% - 104px));
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 7px !important;
  color: #ffffff !important;
  background: #4fa7b5 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 18px !important;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .v-main .original-price[data-v-6b196619] {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  max-width: calc(100% - 118px);
  margin: 0 !important;
  overflow: hidden;
  color: rgba(43, 63, 76, 0.48) !important;
  font-size: 10.5px !important;
  font-weight: 650;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .v-main .original-price[data-v-6b196619] .text-caption {
  font-size: 10px !important;
}

#app .v-main .v-card:has(.discount-badge[data-v-6b196619]) .current-price[data-v-6b196619] {
  margin: 0 !important;
  color: var(--beup-plan-primary-deep) !important;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

#app .v-main .v-card:has(.discount-badge[data-v-6b196619]) .current-price[data-v-6b196619] .text-h6 {
  color: rgba(36, 54, 66, 0.72) !important;
  font-weight: 650;
}

#app .v-main .v-card:has(.discount-badge[data-v-6b196619]) .v-btn[data-v-6b196619] {
  margin-top: 20px !important;
  margin-bottom: 0 !important;
}

/*
 * If the theme's popular/recommend chip is ever rendered inside the same price
 * block, keep it on the far right and move the member pill to the left side.
 * In the current normal screenshot, the "最受欢迎" ribbon is on the intro card,
 * so these rules are a safety net rather than a layout dependency.
 */
#app .v-main .v-card:has(.discount-badge[data-v-6b196619]):has(.v-chip.mt-n2:not(.discount-badge)) .discount-badge[data-v-6b196619] {
  right: auto;
  left: 10px;
  max-width: 86px;
}

#app .v-main .v-card:has(.discount-badge[data-v-6b196619]):has(.v-chip.mt-n2:not(.discount-badge)) .original-price[data-v-6b196619] {
  left: 104px;
  max-width: calc(100% - 210px);
}

@media (max-width: 600px) {
  #app .v-main .v-card:has(.discount-badge[data-v-6b196619]) .pa-6.rounded-md[data-v-6b196619] {
    min-height: 176px;
    padding-top: 40px !important;
    padding-bottom: 22px !important;
    padding-inline: 18px !important;
  }

  #app .v-main .discount-badge[data-v-6b196619] {
    top: 10px;
    right: 10px;
    min-width: 108px;
    max-width: min(122px, calc(100% - 100px));
    padding-inline: 7px !important;
    font-size: 9.5px !important;
  }

  #app .v-main .original-price[data-v-6b196619] {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 104px);
    font-size: 10.5px !important;
  }
}
