/**
 * My Account / storefront UI for BS Barbershop Subscriptions.
 */

.bs-bbs {
  --bs-bbs-radius: 12px;
  --bs-bbs-border: 1px solid rgba(0, 0, 0, 0.08);
  --bs-bbs-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --bs-bbs-accent: var(--e-global-color-accent, #010553);
  --bs-bbs-accent-soft: color-mix(
    in srgb,
    var(--e-global-color-accent, #010553) 14%,
    transparent
  );
  --bs-bbs-muted: var(--e-global-color-text, #a3a3a3);
  --bs-bbs-surface: var(--e-global-color-916fb18, #ffffff);
  --bs-bbs-track: var(--e-global-color-474f106, #f8f8f8);
  color: inherit;
  margin: 0 0 1.75rem;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .bs-bbs {
    --bs-bbs-accent-soft: rgba(1, 5, 83, 0.14);
  }
}

/* My Account: accent CTA (nav links + Confirm booking; scanner uses .bs-scanner-btn in scanner.css) */
a.woocommerce-button.button.bs-dashboard-manage-sub,
a.woocommerce-button.button.bs-dashboard-book.button,
a.woocommerce-button.button.bs-qr-tab-book.button,
.bs-bbs-booking button.button.bs-booking-submit {
  padding: 13px 20px;
  background: var(--e-global-color-primary);
  color: white;
}
.bs-bbs * {
  box-sizing: border-box;
}

.bs-bbs__title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bs-bbs__lead {
  margin: 0 0 1.25rem;
  color: var(--bs-bbs-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.bs-bbs-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bs-bbs-card {
  background: var(--bs-bbs-surface);
  border: var(--bs-bbs-border);
  border-radius: var(--bs-bbs-radius);
  box-shadow: var(--bs-bbs-shadow);
  padding: 1.15rem 1.25rem;
}

.bs-bbs-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.bs-bbs-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.bs-bbs-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--bs-bbs-accent-soft);
  color: var(--bs-bbs-accent);
}

.bs-bbs-badge--muted {
  background: var(--e-global-color-474f106, #f8f8f8);
  color: var(--e-global-color-text, #a3a3a3);
}

.bs-bbs-qr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

/* Wallet badges: inline row below Plan usage progress */
.bs-bbs-qr-usage__wallet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.bs-bbs-wallet-btn {
  display: inline-flex;
  flex: 0 1 auto;
  line-height: 0;
  border-radius: 8px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.bs-bbs-wallet-btn:hover,
.bs-bbs-wallet-btn:focus-visible {
  opacity: 0.92;
  transform: translateY(-1px);
}

.bs-bbs-wallet-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.bs-bbs-wallet-btn img {
  display: block;
  width: auto;
  height: 40px;
  max-width: min(160px, 42vw);
}

.bs-bbs-wallet-btn--google img {
  max-width: min(200px, 48vw);
}

.bs-bbs-qr-usage__wallet .bs-bbs-wallet-btn__hint {
  flex: 1 1 100%;
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--bs-bbs-qr-usage-fg-muted, rgba(255, 255, 255, 0.72));
}

@media (max-width: 520px) {
  .bs-bbs-qr-usage__wallet {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .bs-bbs-wallet-btn {
    justify-content: center;
  }

  .bs-bbs-wallet-btn img {
    height: 38px;
    max-width: 100%;
    margin: 0 auto;
  }
}

.bs-bbs-qr__img {
  border-radius: 10px;
  border: var(--bs-bbs-border);
  padding: 0.5rem;
  background: var(--e-global-color-474f106, #f8f8f8);
  flex-shrink: 0;
}

.bs-bbs-qr__img--generated img,
.bs-bbs-qr__img--generated canvas {
  display: block;
  width: 220px;
  height: 220px;
}

.bs-bbs-qr__meta {
  flex: 1;
  min-width: 180px;
}

/* Subscription QR tab: intro row + visit usage panel */
.bs-bbs-qr-tab__intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.bs-bbs-qr-tab__intro-text {
  flex: 1;
  min-width: min(100%, 220px);
}

.bs-bbs-qr-tab__intro-text .bs-bbs__lead {
  margin-bottom: 0;
}

.bs-bbs-qr-tab .bs-bbs-qr-tab__intro .bs-bbs__title {
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.25;
}

.bs-bbs-qr-tab .bs-bbs-qr-tab__intro .bs-bbs__lead {
  font-size: 1.02rem;
  line-height: 1.62;
  max-width: 42rem;
}

.bs-bbs-qr-tab__actions {
  margin-top: 0;
  flex-shrink: 0;
}

.bs-bbs-qr-tab .bs-bbs-stack > .bs-bbs-card {
  background-color: var(--e-global-color-primary);
  color: white;
}

/* Dark usage island: high-contrast type + progress tuned for dark surfaces */
.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage {
  --bs-bbs-qr-usage-fg: rgba(255, 255, 255, 0.96);
  --bs-bbs-qr-usage-fg-soft: rgba(255, 255, 255, 0.82);
  --bs-bbs-qr-usage-fg-muted: rgba(255, 255, 255, 0.72);
  padding: 1.25rem 1.3rem 1.3rem;
  border-radius: 10px;
  color: var(--bs-bbs-qr-usage-fg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 28px rgba(0, 0, 0, 0.35);
}

.bs-bbs-qr-usage__figures {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.05em 0.12em;
  margin: 0 0 0.45rem;
  line-height: 1;
}

.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage .bs-bbs-qr-usage__remain {
  font-size: 2.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--bs-bbs-qr-usage-fg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage .bs-bbs-qr-usage__slash {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--bs-bbs-qr-usage-fg-muted);
}

.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage .bs-bbs-qr-usage__total {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bs-bbs-qr-usage-fg-soft);
}

.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage .bs-bbs-qr-usage__label {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-bbs-qr-usage-fg-soft);
  line-height: 1.4;
}

.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage .bs-bbs-qr-usage__hint {
  margin: 0 0 1.15rem;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--bs-bbs-qr-usage-fg-soft);
  line-height: 1.55;
}

.bs-bbs-qr-usage__progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage .bs-bbs-qr-usage__progress-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--bs-bbs-qr-usage-fg-soft);
}

.bs-bbs-qr-tab .bs-bbs-card .bs-bbs-qr-usage .bs-bbs-qr-usage__progress-pct {
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--e-global-color-accent, #010553);
  letter-spacing: 0.02em;
}

.bs-bbs-qr-tab
  .bs-bbs-card
  .bs-bbs-qr-usage
  .bs-bbs-qr-usage__progress.bs-bbs-progress {
  margin-top: 0;
  height: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.08);
}

.bs-bbs-qr-tab
  .bs-bbs-card
  .bs-bbs-qr-usage
  .bs-bbs-qr-usage__progress.bs-bbs-progress
  .bs-bbs-progress__bar {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--e-global-color-accent, #010553) 82%, #ffffff) 0%,
    var(--e-global-color-accent, #010553) 55%,
    color-mix(in srgb, var(--e-global-color-accent, #010553) 72%, #000000) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 12px rgba(1, 5, 83, 0.35);
  border-radius: inherit;
}

.bs-bbs-stat {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

.bs-bbs-stat__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bs-bbs-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bs-bbs-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--bs-bbs-track);
  overflow: hidden;
  margin-top: 0.65rem;
}

.bs-bbs-progress__bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--bs-bbs-accent),
    color-mix(in srgb, var(--e-global-color-accent, #010553) 68%, #000000)
  );
  border-radius: inherit;
  transition: width 0.35s ease;
}

.bs-bbs-empty {
  text-align: center;
  padding: 2rem 1.25rem;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: var(--bs-bbs-radius);
  background: color-mix(
    in srgb,
    var(--e-global-color-primary, #990000) 22%,
    transparent
  );
  color: var(--e-global-color-primary, #990000);
  font-size: 0.95rem;
  line-height: 1.55;
}

.bs-bbs-empty__title {
  display: block;
  font-weight: 600;
  color: var(--e-global-color-primary, #990000);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

/* Book a visit tab: use full My Account content width + readable type on dark panels */
.bs-bbs-booking {
  --bs-bbs-booking-fg: rgba(255, 255, 255, 0.92);
  --bs-bbs-booking-fg-muted: rgba(255, 255, 255, 0.78);
  --bs-bbs-booking-fg-soft: rgba(255, 255, 255, 0.68);
  --bs-bbs-booking-input-bg: color-mix(
    in srgb,
    var(--sections-background-color, #2a2f36) 78%,
    #ffffff 22%
  );
  --bs-bbs-booking-input-border: rgba(255, 255, 255, 0.2);
  --bs-bbs-booking-input-color: rgba(255, 255, 255, 0.94);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.bs-bbs-booking > .bs-bbs__title {
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--e-global-color-secondary, rgba(255, 255, 255, 0.94));
}

.bs-bbs-booking > .bs-bbs__lead {
  font-size: 1.02rem;
  line-height: 1.62;
  margin: 0 0 1.5rem;
  max-width: 100%;
  color: var(--bs-bbs-booking-fg-muted);
}

.bs-bbs-booking > .bs-bbs-card,
.bs-bbs-booking > .bs-bbs-empty,
.bs-bbs-booking > .bs-bbs-table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.bs-bbs-booking > .bs-bbs-card {
  background-color: var(--sections-background-color, var(--bs-bbs-surface));
  padding: 1.35rem 1.45rem;
  margin: 0 0 1.75rem;
}

.bs-bbs-booking > .bs-bbs-empty {
  margin: 0 0 1.25rem;
  color: var(--bs-bbs-booking-fg-muted);
}

.bs-bbs-booking > .bs-bbs-empty .bs-bbs-empty__title {
  color: var(--bs-bbs-booking-fg);
}

.bs-bbs-booking > .bs-bbs-table-wrap {
  margin: 0;
  background-color: var(--sections-background-color, var(--bs-bbs-surface));
  border-color: rgba(255, 255, 255, 0.14);
}

.bs-bbs-booking .bs-bbs-section-title {
  max-width: 100%;
  margin: 0 0 1rem;
  padding-top: 0.25rem;
  color: var(--e-global-color-secondary, rgba(255, 255, 255, 0.92));
  border-top-color: rgba(255, 255, 255, 0.12);
}

.bs-bbs-booking .bs-bbs-form-grid {
  gap: 1.2rem;
}

.bs-bbs-booking .bs-bbs-actions {
  margin-top: 0.5rem;
}

.bs-bbs-booking .bs-bbs-field label {
  color: var(--bs-bbs-booking-fg);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.bs-bbs-booking .bs-bbs-field__hint {
  font-size: 0.84rem;
  color: var(--bs-bbs-booking-fg-soft);
}

.bs-bbs-booking .bs-bbs-field input[type="date"],
.bs-bbs-booking .bs-bbs-field select {
  background-color: var(--bs-bbs-booking-input-bg);
  color: var(--bs-bbs-booking-input-color);
  border-color: var(--bs-bbs-booking-input-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
  color-scheme: dark;
}

.bs-bbs-booking
  .bs-bbs-field
  input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.75;
  cursor: pointer;
}

.bs-bbs-booking .bs-bbs-field input[type="date"]:focus,
.bs-bbs-booking .bs-bbs-field select:focus {
  border-color: var(--e-global-color-accent, #010553);
  outline: none;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    0 0 0 2px
      color-mix(in srgb, var(--e-global-color-accent, #010553) 45%, transparent);
}

.bs-bbs-booking .bs-bbs-field select:disabled {
  opacity: 0.55;
  color: var(--bs-bbs-booking-fg-soft);
  cursor: not-allowed;
}

.bs-bbs-booking .bs-bbs-table-wrap .shop_table {
  width: 100%;
}

.bs-bbs-booking > .bs-bbs-table-wrap .shop_table th,
.bs-bbs-booking > .bs-bbs-table-wrap .shop_table td {
  color: var(--bs-bbs-booking-fg-muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.bs-bbs-booking > .bs-bbs-table-wrap .shop_table thead th {
  color: var(--bs-bbs-booking-fg);
  font-weight: 700;
}

.bs-bbs-booking > .bs-bbs-table-wrap .shop_table .button {
  color: var(--e-global-color-secondary, #010553);
}

.bs-bbs-form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .bs-bbs-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bs-bbs-form-grid .bs-bbs-field--full {
    grid-column: 1 / -1;
  }
}

.bs-bbs-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--e-global-color-secondary, #010553);
}

.bs-bbs-field input[type="date"],
.bs-bbs-field select {
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #c3c4c7;
  font-size: 1rem;
  line-height: 1.4;
  background: var(--e-global-color-825cd65, #ffffff);
}

.bs-bbs-field select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.bs-bbs-field__hint {
  font-size: 0.8rem;
  color: var(--bs-bbs-muted);
  margin: 0.35rem 0 0;
}

.bs-bbs-field__hint.bs-bbs-is-error {
  color: #b32d2e;
  font-weight: 500;
}

.bs-bbs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.bs-bbs-actions .button {
  min-height: 40px;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.bs-bbs-actions .button.alt {
  font-weight: 600;
}

/* Dashboard: pause/cancel use the same classes as WooCommerce Subscriptions action links */
.bs-bbs-dashboard-fees__list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.bs-bbs-dashboard-fees__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bs-bbs-dashboard-fees__item:last-child {
  border-bottom: 0;
}

.bs-bbs-dashboard-fees__label {
  font-weight: 600;
  max-width: 100%;
}

.bs-bbs-dashboard-fees__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.bs-bbs-dashboard-fees__plans {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--bs-bbs-muted);
  line-height: 1.45;
}

.bs-bbs-dashboard-fees__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.bs-bbs-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.bs-bbs-section-title:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.bs-bbs-booking .bs-bbs-section-title:first-of-type {
  margin: 0 0 1rem;
  padding-top: 0;
  border-top: 0;
}

.bs-bbs-section-title--flush {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.bs-bbs-table-wrap {
  overflow-x: auto;
  border-radius: var(--bs-bbs-radius);
  border: var(--bs-bbs-border);
  box-shadow: var(--bs-bbs-shadow);
  background: var(--bs-bbs-surface);
}

.bs-bbs-table-wrap .shop_table {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.bs-bbs-table-wrap .shop_table th,
.bs-bbs-table-wrap .shop_table td {
  vertical-align: middle;
}

.bs-bbs-table-wrap .shop_table .button {
  white-space: nowrap;
}

.bs-bbs-inline-cancel {
  margin: 0;
}

/* My Account — Dashboard: panel padding, WC intro paragraphs, plugin block stack */
.woocommerce-MyAccount-content:has(.bs-bbs-dashboard-fees) {
  padding: 1.35rem 1.35rem 2rem;
  box-sizing: border-box;
}

.woocommerce-MyAccount-content:has(.bs-bbs-dashboard-fees) > p {
  margin-block-start: 0;
  margin-block-end: 1rem;
}

.bs-bbs.bs-bbs-dashboard-fees {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.35rem;
}

.bs-bbs-dashboard-fees > .bs-bbs-section-title {
  margin: 0;
  padding: 0;
  border: 0;
}

.bs-bbs-dashboard-fees .bs-bbs__lead,
.bs-bbs-dashboard-fees .bs-bbs-dashboard-fees__plans {
  margin: 0;
}

.bs-bbs-dashboard-fees .bs-bbs-dashboard-fees__cta {
  margin-top: 0.15rem;
}

/* Sidebar: keep labels off the panel edge */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  padding-inline: 1.1rem 0.85rem;
}

/* My Account — Book a visit: panel padding (match dashboard rhythm) */
.woocommerce-MyAccount-content:has(.bs-bbs-booking) {
  padding: 1.35rem 1.35rem 2rem;
  box-sizing: border-box;
}

/* My Account — Check-in scanner */
.woocommerce-MyAccount-content:has(.bs-scanner-account) {
  padding: 1.35rem 1.35rem 2rem;
  box-sizing: border-box;
}

.bs-scanner-account.bs-bbs {
  width: 100%;
  max-width: 100%;
}

.bs-scanner-account > .bs-bbs__title {
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--e-global-color-secondary, rgba(255, 255, 255, 0.94));
}

.bs-scanner-account > .bs-bbs__lead {
  font-size: 1.02rem;
  line-height: 1.62;
  margin: 0 0 1rem;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.78);
}

.bs-scanner-account > .bs-bbs__lead.bs-scanner-manual-intro {
  margin-bottom: 1.65rem;
  color: rgba(255, 255, 255, 0.72);
}

.bs-scanner-account .bs-scanner-stack {
  margin-top: 0.15rem;
}

/**
 * View subscription — tables (details, totals, related orders).
 * Scoped so regular order / checkout `order_details` tables are unchanged.
 */
.woocommerce-MyAccount-content:has(
  #woocommerce-subscriptions-related-orders-table
) {
  --bs-bbs-sub-table-border: color-mix(in srgb, currentColor 14%, transparent);
  --bs-bbs-sub-table-head: color-mix(in srgb, currentColor 6%, transparent);
  --bs-bbs-sub-table-radius: 12px;
  --bs-bbs-sub-table-pad-x: 1rem;
  --bs-bbs-sub-table-pad-y: 0.72rem;
  --bs-bbs-sub-label-fg: color-mix(in srgb, currentColor 72%, transparent);
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 1.5rem;
  border: 1px solid var(--bs-bbs-sub-table-border);
  border-radius: var(--bs-bbs-sub-table-radius);
  overflow: hidden;
  background: var(--sections-background-color, var(--bs-bbs-surface, #fff));
  box-shadow: 0 1px 0 color-mix(in srgb, currentColor 8%, transparent);
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table:last-of-type {
  margin-bottom: 0;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table
  th,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table
  td {
  padding: var(--bs-bbs-sub-table-pad-y) var(--bs-bbs-sub-table-pad-x);
  border: 0;
  border-bottom: 1px solid var(--bs-bbs-sub-table-border);
  vertical-align: middle;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  tbody
  tr:last-child
  th,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  tbody
  tr:last-child
  td,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table
  tfoot
  tr:last-child
  th,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table
  tfoot
  tr:last-child
  td,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  #woocommerce-subscriptions-related-orders-table
  tbody
  tr:last-child
  th,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  #woocommerce-subscriptions-related-orders-table
  tbody
  tr:last-child
  td {
  border-bottom: 0;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table
  thead
  th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bs-bbs-sub-table-head);
  color: inherit;
  text-align: start;
  border-bottom: 1px solid var(--bs-bbs-sub-table-border);
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.order_details
  thead
  th.product-total,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.order_details
  tbody
  td.product-total,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.order_details
  tfoot
  td {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.order_details
  tfoot
  th {
  text-align: start;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.order_details
  tfoot
  tr:last-child
  th,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.order_details
  tfoot
  tr:last-child
  td {
  font-weight: 700;
  border-top: 1px solid var(--bs-bbs-sub-table-border);
  border-bottom: 0;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Subscription details: label / value columns */
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  tbody
  td:first-child {
  width: 34%;
  max-width: 220px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-bbs-sub-label-fg);
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  tbody
  td:last-child {
  font-size: 0.95rem;
  font-weight: 500;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  .subscription-payment-method {
  display: inline-block;
  max-width: 100%;
}

/* Actions: readable buttons on light or dark surfaces */
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  tbody
  tr:last-child
  td:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  align-items: center;
  line-height: 1.45;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  tbody
  tr:last-child
  td:last-child
  .button,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  #woocommerce-subscriptions-related-orders-table
  .button.view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  background: var(--e-global-color-accent, #010553);
  color: var(--e-global-color-916fb18, #ffffff);
  box-shadow: 0 1px 0 color-mix(in srgb, #ffffff 22%, transparent);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  table.shop_table.subscription_details
  tbody
  tr:last-child
  td:last-child
  .button:hover,
.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  #woocommerce-subscriptions-related-orders-table
  .button.view:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  #woocommerce-subscriptions-related-orders-table
  .woocommerce-orders-table__cell-order-actions {
  text-align: start;
  vertical-align: middle;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  #woocommerce-subscriptions-related-orders-table
  .woocommerce-orders-table__header-order-actions {
  text-align: start;
}

.woocommerce-MyAccount-content:has(
    #woocommerce-subscriptions-related-orders-table
  )
  #woocommerce-subscriptions-related-orders-table
  td.order-total {
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .woocommerce-MyAccount-content:has(
      #woocommerce-subscriptions-related-orders-table
    )
    #woocommerce-subscriptions-related-orders-table
    tbody
    tr:hover {
    background: color-mix(in srgb, currentColor 5%, transparent);
  }
}
