/* Web game search results, empty states and purchase options modal. */
.game-search-close {
  position: relative;
  font-size: 0;
}

.game-search-close::before,
.game-search-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.game-search-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.game-search-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.game-search-results {
  position: absolute;
  top: calc(100% + 8px);
  bottom: auto;
  left: 0;
  right: 0;
  max-height: min(370px, 46vh);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(23, 25, 31, 0.99);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}

.game-search-group {
  display: grid;
  gap: 7px;
}

.game-search-group + .game-search-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.game-search-group-title,
.game-search-empty {
  color: #aeb4c1;
  font-size: 13px;
  line-height: 1.25;
}

.game-search-group-title {
  padding: 2px 6px;
  font-weight: 700;
}

.game-search-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  border: 0;
  border-radius: 15px;
  background: #1d2027;
  color: #f7f8ff;
  font: inherit;
  text-align: left;
}

.game-search-row:active {
  transform: translateY(1px);
}

.game-search-row-title {
  font-weight: 760;
}

.game-search-row-meta {
  color: #aeb4c1;
  font-size: 12px;
}

.game-search-empty {
  padding: 13px 14px;
}

.game-search-empty-action {
  display: grid;
  gap: 12px;
}

.game-search-empty-action p {
  margin: 0;
}

.game-search-empty-action .md-primary-btn {
  justify-self: start;
  width: auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

.game-search-modal {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  place-items: end center;
  padding: 18px;
}

.game-search-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.58);
}

.game-search-modal-card {
  position: relative;
  width: min(572px, 100%);
  max-height: min(76vh, 620px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 24px 20px 20px;
  background: #181a20;
  color: #f7f8ff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
}

.game-search-modal-card::-webkit-scrollbar {
  display: none;
}

.game-search-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.game-search-modal-body {
  display: grid;
  gap: 14px;
  padding-right: 34px;
}

.game-search-modal-kicker {
  color: #8fa2ff;
  font-size: 13px;
  font-weight: 800;
}

.game-search-modal-body h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.game-search-modal-body p {
  margin: 0;
  color: #c5cad5;
  font-size: 15px;
  line-height: 1.35;
}

.game-search-options {
  display: grid;
  gap: 10px;
}

.game-search-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 17px;
  background: #101218;
}

.game-search-option .md-primary-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

.game-search-option strong,
.game-search-option span {
  display: block;
}

.game-search-option strong {
  color: #fff;
  font-size: 15px;
}

.game-search-option span {
  margin-top: 3px;
  color: #aeb4c1;
  font-size: 12px;
}

.md-app {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.md-panel {
  display: none;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: calc(98px + env(safe-area-inset-top, 0px)) 24px var(--md-bottom-nav-clearance, calc(96px + max(4px, calc(env(safe-area-inset-bottom, 0px) - 12px))));
  -webkit-overflow-scrolling: touch;
}

.md-panel.is-active {
  display: block;
}

.md-home-panel {
  padding-top: calc(142px + env(safe-area-inset-top, 0px));
}

.web-chat-body[data-active-panel="autopay"].is-game-search-open .md-autopay-panel {
  padding-top: calc(142px + env(safe-area-inset-top, 0px));
}

.md-chat-panel.is-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  padding: 10px 0 0;
}

.md-balance-card,
.md-info-card,
.md-quickpay-card,
.md-empty-state {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background: #181a20;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
}

.md-balance-card {
  padding: 18px 18px 17px;
  border-radius: 22px;
}

.md-balance-head {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f6f7fb;
  font-size: 19px;
  font-weight: 560;
}

.md-wallet-icon {
  position: relative;
  width: 44px;
  height: 37px;
  border-radius: 12px;
  background: linear-gradient(145deg, #cf7a36, #935528);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 24px rgba(0, 0, 0, 0.26);
}

.md-wallet-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -6px;
  width: 23px;
  height: 14px;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(135deg, #55e2cf, #2aa9ff);
  transform: rotate(-12deg);
}

.md-wallet-icon::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5c66a;
}

.md-balance-amount {
  display: block;
  width: 100%;
  margin: 18px 0 17px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f9f9ff;
  text-align: left;
  font-size: clamp(38px, 9.4vw, 52px);
  font-weight: 730;
  line-height: 1;
  letter-spacing: 0;
}

.md-balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.md-balance-actions .md-soft-btn {
  min-height: 48px;
  border-radius: 12px;
  font-size: 15px;
}

.md-soft-btn,
.md-primary-btn,
.md-action-list button {
  min-height: 58px;
  border: 0;
  border-radius: 9px;
  background: #282a30;
  color: #f7f8ff;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.md-primary-btn {
  width: 100%;
  background: linear-gradient(135deg, #2768ff, #7b3cff);
  box-shadow: 0 18px 34px rgba(65, 87, 255, 0.22);
}

.md-referral-strip {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  margin: 16px 0 18px;
  padding: 0 86px;
  border: 0;
  background: transparent;
  color: #f3f4fb;
  text-align: left;
  font-size: 13px;
  line-height: 1.2;
}

.md-plus-orb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c8dff, #723dff);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 8px 20px rgba(55, 99, 255, 0.34);
}

.md-info-card {
  position: relative;
  padding: 17px 18px;
  border-radius: 22px;
}

.md-info-card h2,
.md-products-section h2,
.md-section-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.05;
}

.md-info-card p {
  margin: 0;
  max-width: calc(100% - 34px);
  color: #e2e5ef;
  font-size: 16px;
  line-height: 1.3;
}

.md-section-head p {
  margin: 0;
  color: #f0f1f8;
  font-size: 20px;
  line-height: 1.18;
}

.md-info-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #b6bac5;
  font-size: 28px;
  line-height: 1;
}

.md-products-section {
  margin-top: 32px;
}

.md-products-section h2 {
  margin-bottom: 28px;
  text-align: center;
  font-size: 34px;
  font-weight: 500;
}

.md-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 26px;
}

.md-product-card {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f7f8ff;
  font: inherit;
  font-size: 18px;
}

.md-product-icon {
  position: relative;
  overflow: hidden;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #181a20;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.md-product-icon > span {
  position: relative;
  z-index: 2;
}

.md-action-icon {
  position: relative;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.md-icon-steam {
  background:
    radial-gradient(circle at 36% 30%, #fffb8f 0 11%, transparent 12%),
    radial-gradient(circle at 48% 48%, #ff5b33 0 34%, #c6204c 58%, #161923 59%);
}

.md-icon-steam::after {
  content: "";
  position: absolute;
  inset: 18% 24% 14% 24%;
  border-radius: 56% 56% 46% 46%;
  background: linear-gradient(180deg, #ffec69, #ff4a2d 70%, #9b1438);
  transform: rotate(-8deg);
  opacity: 0.9;
}

.md-icon-steam > span,
.md-action-icon.md-icon-steam {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
