/* Compact catalog density; Kitty Galore visual identity remains unchanged. */
/* Scoped to Game Credits catalogs only, without touching selection or checkout behavior. */
.mlbb-catalog-surface .mlbb-catalog-hero {
  gap: 0;
  padding: 0.75rem;
}

.mlbb-catalog-surface .mlbb-catalog-identity {
  align-items: flex-start;
  gap: 0.7rem;
}

.mlbb-catalog-surface .kg-catalog-hero__logo {
  width: 72px;
  height: 72px;
  min-width: 72px;
  flex: 0 0 72px;
  padding: 0;
}

.mlbb-catalog-surface .mlbb-catalog-identity-copy {
  column-gap: 0.35rem;
  row-gap: 0.2rem;
  align-content: start;
}

.mlbb-catalog-surface .mlbb-catalog-identity-copy > .mlbb-catalog-region {
  order: 1;
  align-self: center;
}

.mlbb-catalog-surface .mlbb-catalog-hero .kg-catalog-hero__title {
  order: 0;
  flex: 1 0 100%;
  font-size: clamp(1rem, 2.3vw, 1.3rem);
  line-height: 1.14;
}

.mlbb-catalog-surface .mlbb-catalog-region {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.45rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Round geographic region icons in both the catalog hero and region selector. */
.mlbb-catalog-surface .mlbb-region-flag[data-region-flag]:not([data-region-flag="mcgg"]) {
  display: inline-block;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  overflow: hidden;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(25, 25, 40, 0.08);
}
.mlbb-catalog-surface .mlbb-region-flag[data-region-flag="ph"] {
  background-image: url("/assets/philippines-round-flag.svg");
}
.mlbb-catalog-surface .mlbb-region-flag[data-region-flag="global"] {
  background-image: url("/assets/global-round-region.svg");
}
.mlbb-catalog-surface .mlbb-region-flag[data-region-flag="turkey"] {
  background-image: url("/assets/turkey-round-flag.svg");
}
.mlbb-catalog-surface .mlbb-region-flag[data-region-flag="us"] {
  background-image: url("/assets/us-round-flag.svg");
}
.mlbb-catalog-surface .mlbb-region-flag[data-region-flag="sgmy"] {
  background-image: url("/assets/singapore-malaysia-split-round-flag.svg");
}
.mlbb-catalog-surface .mlbb-region-option-icon .mlbb-region-flag[data-region-flag] {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
}

.mlbb-catalog-surface .mlbb-catalog-identity-copy > .mlbb-region-action {
  order: 2;
  min-height: 28px;
  padding-inline: 0.55rem;
  font-size: 0.72rem;
}

.mlbb-catalog-surface .kg-game-disclosure {
  flex: 1 0 100%;
  min-width: 0;
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: 0;
}

.mlbb-catalog-surface .kg-game-disclosure__summary {
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  gap: 0.15rem;
  padding: 0.2rem 0.15rem;
  border-radius: 0.4rem;
  list-style: none;
  cursor: pointer;
}

.mlbb-catalog-surface .kg-game-disclosure__summary::-webkit-details-marker {
  display: none;
}

.mlbb-catalog-surface .kg-game-disclosure__summary::marker {
  content: "";
}

.mlbb-catalog-surface .kg-game-disclosure__preview {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--color-kg-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.mlbb-catalog-surface .kg-game-disclosure__toggle {
  justify-self: center;
  min-width: 32px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--color-kg-rose-700);
  font-size: 0.74rem;
  font-weight: 800;
}

.mlbb-catalog-surface .kg-game-disclosure__less {
  display: none;
}

.mlbb-catalog-surface .kg-game-disclosure__more,
.mlbb-catalog-surface .kg-game-disclosure__less {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.mlbb-catalog-surface .kg-game-disclosure[open] .kg-game-disclosure__less {
  display: inline;
}

.mlbb-catalog-surface .kg-game-disclosure[open] .kg-game-disclosure__more {
  display: none;
}

.mlbb-catalog-surface .kg-game-disclosure__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 0;
  line-height: 0;
  transition: transform 150ms ease;
}

.mlbb-catalog-surface .kg-game-disclosure__chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 1px;
  transform: translateY(-2px) rotate(45deg);
}

.mlbb-catalog-surface .kg-game-disclosure[open] .kg-game-disclosure__chevron {
  transform: rotate(180deg);
}

.mlbb-catalog-surface .kg-game-disclosure__summary:focus-visible {
  outline: 3px solid var(--color-kg-rose-400);
  outline-offset: 2px;
}

.mlbb-catalog-surface .kg-game-disclosure__content {
  display: grid;
  gap: 0.55rem;
  padding: 0.5rem 0.2rem 0.4rem;
  color: var(--color-kg-ink);
  font-size: 0.78rem;
  line-height: 1.55;
}

.mlbb-catalog-surface .kg-game-disclosure__content p {
  margin: 0;
}

.mlbb-catalog-surface .kg-game-disclosure__content a {
  color: var(--color-kg-rose-700);
  font-weight: 800;
  text-underline-offset: 0.15em;
}

@media (max-width: 430px) {
  .mlbb-catalog-surface .kg-catalog-hero__logo {
    width: 72px;
    height: 72px;
    min-width: 72px;
    flex-basis: 72px;
    padding: 0;
  }

  .mlbb-catalog-surface .mlbb-catalog-hero .kg-catalog-hero__title {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mlbb-catalog-surface .kg-game-disclosure__chevron {
    transition: none;
  }
}

/* Mobile density: retain all fields, saved-account controls, and 44px tap targets. */
@media (max-width: 699px) {
  .mlbb-catalog-surface .mlbb-account-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.6rem;
    padding: 11px;
  }

  .mlbb-catalog-surface .mlbb-account-card > .mlbb-card-heading-row,
  .mlbb-catalog-surface .mlbb-account-card > .mlbb-account-fields,
  .mlbb-catalog-surface .mlbb-account-card > .mlbb-saved-accounts {
    grid-column: 1 / -1;
  }

  .mlbb-catalog-surface .mlbb-account-fields {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 7px;
    margin-top: 6px;
  }

  .mlbb-catalog-surface .mlbb-account-fields .mlbb-account-ign {
    grid-column: 1 / -1;
  }

  .mlbb-catalog-surface .mlbb-account-fields input {
    padding-inline: 8px;
    font-size: 0.8rem;
  }

  .mlbb-catalog-surface .mlbb-field-label {
    font-size: 0.68rem;
  }

  .mlbb-catalog-surface .mlbb-saved-accounts {
    margin-top: 9px;
    padding: 8px;
  }

  .mlbb-catalog-surface .mlbb-saved-accounts-help {
    margin: 3px 0 5px;
    line-height: 1.3;
  }

  .mlbb-catalog-surface .mlbb-saved-option {
    padding: 6px 8px;
  }

  .mlbb-catalog-surface .mlbb-account-card > .mlbb-id-help {
    grid-column: 1;
    align-self: start;
  }

  .mlbb-catalog-surface .mlbb-account-card > .mlbb-customer-note-disclosure {
    grid-column: 2;
    justify-self: end;
    align-self: start;
  }

  .mlbb-catalog-surface .mlbb-account-card:has(#mlbbIdHelpToggle[aria-expanded="true"]) > .mlbb-id-help,
  .mlbb-catalog-surface .mlbb-account-card:has(#mlbbCustomerNoteToggle[aria-expanded="true"]) > .mlbb-customer-note-disclosure {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

/* CodaShop-style stacked catalog groups: all current offers visible in their sections. */
.mlbb-catalog-surface .mlbb-catalog-groups .mlbb-category-wrap {
  display: block;
  position: sticky;
  top: calc(var(--site-header-height) + max(0px, env(safe-area-inset-top)));
  z-index: 20; /* Mobile Buy Now is fixed at z-index: 40. */
  border-radius: 0.5rem;
}

.mlbb-catalog-surface .mlbb-catalog-groups .mlbb-category-btn {
  white-space: nowrap;
}

.mlbb-catalog-surface .mlbb-catalog-groups .mlbb-item-group {
  scroll-margin-top: calc(var(--site-header-height) + max(0px, env(safe-area-inset-top)) + 64px);
}

.mlbb-catalog-surface .mlbb-catalog-groups .mlbb-item-group + .mlbb-item-group {
  margin-top: 1.1rem;
}

.mlbb-catalog-surface .mlbb-catalog-groups .mlbb-item-group-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.mlbb-catalog-surface .mlbb-catalog-groups .mlbb-item-group-title {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.mlbb-catalog-surface .mlbb-catalog-groups .mlbb-item-group-helper {
  margin: 0;
  color: var(--color-kg-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
