.swgoh-bundle-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 4px;
  container-type: inline-size;
}

.swgoh-bundle-steps button {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 3px;
  border: 0;
  border-radius: var(--dt-control-radius);
  color: var(--dt-control-idle-color);
  background: var(--dt-control-idle-background);
  box-shadow: var(--dt-control-idle-shadow);
  transition: var(--dt-interactive-transition-shadow, box-shadow 0.2s ease);
  font: 600 13px/1.2 var(--font-body) !important;
  white-space: nowrap;
}

@container (max-width: 155px) {
  .swgoh-bundle-steps button {
    font-size: 12px !important;
  }
}

.swgoh-bundle-steps button[aria-pressed="true"] {
  background: var(--dt-control-selected-background);
  color: var(--dt-control-selected-color);
  box-shadow: var(--dt-control-selected-shadow);
  text-shadow: var(--dt-control-selected-text-shadow);
}

@media (hover: hover) {
  .swgoh-bundle-steps button[aria-pressed="false"]:hover {
    color: var(--dt-control-hover-color);
    box-shadow: var(--dt-control-hover-shadow);
  }

  .swgoh-bundle-steps button[aria-pressed="true"]:hover {
    box-shadow: var(--dt-control-selected-hover-shadow);
  }
}

.swgoh-bundle-steps button:focus-visible {
  outline: 2px solid var(--game-brand);
  outline-offset: 2px;
}

.swgoh-bundle-includes {
  margin: 0;
  color: var(--game-muted);
  font-size: 13px;
}

.product-card--info-open :is(.swgoh-bundle-steps, .swgoh-bundle-includes) {
  visibility: hidden;
}

#products.products:has(> [data-bundle-group]) > .product-card .price-row:has(.add-btn) {
  display: flex !important;
  gap: 12px !important;
}

.product-card[data-bundle-group] .card-title {
  flex: 1 0 auto;
  height: auto;
  max-height: none;
}

.product-card[data-bundle-group] .product-card__info-trigger--inline {
  align-self: start;
  height: var(--product-info-trigger-size) !important;
}

#products.products:has(> [data-bundle-group]) > .product-card {
  align-self: stretch;
}

#products.products:has(> [data-bundle-group]) > .product-card .price-row {
  margin-block-start: auto;
}

@media (max-width: 530px) {
  #products.products:has(> [data-bundle-group]) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr)) !important;
  }
}

.product-card[data-bundle-group] :is(.swgoh-bundle-steps, .swgoh-bundle-includes),
.product-card[data-bundle-group] .price-row > :not(.swgoh-picker-trigger) {
  display: none !important;
}

.product-card[data-bundle-group] .price-row:has(.swgoh-picker-trigger) {
  display: block !important;
}

.product-card[data-bundle-group] .swgoh-picker-trigger {
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 8px;
  cursor: pointer;
}

.swgoh-picker {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  height: fit-content;
  max-width: none;
  max-height: calc(100dvh - 32px);
  background: var(--game-panel);
}

.swgoh-picker::backdrop {
  background: var(--dt-modal-overlay-bg);
  backdrop-filter: var(--dt-modal-overlay-blur);
}

.swgoh-picker-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  margin-bottom: 16px;
}

.swgoh-picker-header h2 { margin: 0; }

.swgoh-picker .swgoh-picker-close {
  position: static;
  margin-block-start: calc((clamp(22px, 2.2vw, 28px) * 1.15 - var(--close-btn-size, 32px)) / 2);
  padding: 0;
}

.swgoh-picker .swgoh-picker-close:hover {
  box-shadow: var(--close-btn-hover-shadow);
}

.swgoh-picker .swgoh-picker-close:focus-visible {
  outline: 2px solid var(--dt-modal-brand);
  outline-offset: 2px;
}

.swgoh-picker-options { display: grid; gap: 8px; }

.swgoh-picker-option {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 8px 16px;
  text-align: start;
}

.swgoh-picker-option input {
  position: absolute;
  inset-inline-start: 0;
  opacity: 0;
}

.swgoh-picker .swgoh-picker-option.is-active {
  box-shadow: inset 0 0 0 1.5px var(--dt-control-selected-border-color);
  text-shadow: none;
}

.swgoh-picker-option small {
  display: block;
  margin-top: 4px;
  color: var(--dt-modal-muted);
  font-weight: 500;
}

.swgoh-picker-option:has(:focus-visible) {
  outline: 2px solid var(--dt-modal-brand);
  outline-offset: 2px;
}

.swgoh-picker-option .num {
  color: var(--dt-control-idle-color);
  white-space: nowrap;
}

.swgoh-picker .btn.btn--brand.swgoh-picker-add {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--dt-modal-brand);
  box-shadow: none;
  text-shadow: none;
}

.swgoh-picker .btn.btn--brand.swgoh-picker-add::before {
  content: none;
}

@media (hover: hover) {
  .swgoh-compact-steps :is(
    .swgoh-picker .btn.btn--brand.swgoh-picker-add,
    .swgoh-picker .swgoh-picker-option.is-active
  ):hover:not(:disabled) {
    box-shadow: var(--dt-interactive-primary-hover-shadow, var(--pay-btn-hover-enhanced));
  }
}

@media (prefers-reduced-motion: reduce) {
  .swgoh-compact-steps #products > .product-card { opacity: 1 !important; animation: none !important; }
}

@media (max-width: 600px) {
  .swgoh-picker {
    inset: auto 0 0;
    width: 100%;
    margin: 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }
}
