/* Web liquid header, game search shell and purchase guide controls. */
.web-chat-body .header-actions {
  gap: 10px;
}

.web-chat-body .header-icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.32));
}

.web-chat-body .header-action-img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.web-chat-body .app-link-btn.youtube-link-btn,
.web-chat-body .app-link-btn.mail-link-btn {
  background: transparent;
}

.web-chat-body .header-logout-btn {
  border: 1px solid rgba(255, 139, 139, 0.38);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.22), transparent 44%),
    linear-gradient(145deg, rgba(84, 34, 48, 0.78), rgba(25, 17, 25, 0.52));
  color: #fff3f3;
  filter:
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 12px rgba(255, 102, 102, 0.14));
}

.web-chat-body .header-logout-btn svg {
  width: 19px;
  height: 19px;
}

.web-chat-body .header-logout-btn:hover {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.3), transparent 46%),
    linear-gradient(145deg, rgba(105, 42, 58, 0.86), rgba(34, 20, 31, 0.62));
}

.web-chat-body .header-logout-btn:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.web-chat-body .support-btn,
.web-chat-body .theme-toggle-btn,
.web-chat-body .burger-btn {
  display: none;
}

.game-search-shell {
  position: fixed;
  z-index: 34;
  top: calc(80px + env(safe-area-inset-top, 0px));
  bottom: auto;
  left: 50%;
  width: min(596px, calc(100vw - 20px));
  padding: 0;
  display: grid;
  transform: translateX(-50%);
  pointer-events: none;
}

.purchase-guide-shell {
  position: fixed;
  z-index: 35;
  top: calc(80px + env(safe-area-inset-top, 0px));
  left: 50%;
  width: min(596px, calc(100vw - 20px));
  padding: 0;
  display: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.web-chat-body .purchase-guide-shell {
  display: none !important;
}

.web-chat-body[data-active-panel="quickpay"] .game-search-shell {
  top: calc(78px + env(safe-area-inset-top, 0px));
  bottom: auto;
  width: min(596px, calc(100vw - 20px));
}

.web-chat-body[data-active-panel="support"] .game-search-shell {
  display: none;
}

.web-chat-body[data-active-panel="quickpay"] .purchase-guide-shell {
  display: grid !important;
  top: calc(78px + env(safe-area-inset-top, 0px));
  width: min(596px, calc(100vw - 20px));
  padding: 0;
}

.web-chat-body.is-game-search-collapsed:not(.is-game-search-open):not([data-active-panel="support"]):not([data-active-panel="autopay"]) .purchase-guide-shell {
  display: grid !important;
}

.game-search-shell.is-dismissed {
  display: none;
}

.game-search-toggle,
.game-search-close,
.game-search-modal-close,
.purchase-guide-toggle,
.purchase-guide-close {
  display: inline-grid;
  place-items: center;
  border: 0;
  color: #f7f8ff;
  font: inherit;
}

.purchase-guide-toggle {
  min-width: 46px;
  min-height: 46px;
  justify-self: start;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  padding: 0 15px 0 13px;
  border-radius: 15px;
  border: 1px solid rgba(85, 226, 207, 0.34);
  background:
    radial-gradient(circle at 22% 20%, rgba(158, 248, 255, 0.28), transparent 42%),
    linear-gradient(135deg, rgba(30, 46, 63, 0.86), rgba(39, 104, 255, 0.72)),
    rgba(15, 17, 23, 0.48);
  box-shadow:
    0 0 0 4px rgba(85, 226, 207, 0.09),
    0 14px 28px rgba(39, 104, 255, 0.18),
    0 18px 34px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.purchase-guide-toggle:hover,
.purchase-guide-toggle:focus-visible,
.purchase-guide-shell.is-open .purchase-guide-toggle {
  border-color: rgba(158, 248, 255, 0.66);
  box-shadow:
    0 0 0 5px rgba(85, 226, 207, 0.14),
    0 14px 30px rgba(39, 104, 255, 0.26),
    0 20px 38px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.purchase-guide-toggle svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.game-search-toggle {
  display: none !important;
  position: relative;
  isolation: isolate;
  justify-self: end;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 1px solid rgba(125, 151, 255, 0.34);
  background:
    radial-gradient(circle at 34% 26%, rgba(85, 226, 207, 0.32), transparent 38%),
    linear-gradient(135deg, rgba(39, 104, 255, 0.92), rgba(123, 60, 255, 0.88));
  box-shadow:
    0 0 0 4px rgba(76, 130, 255, 0.13),
    0 14px 28px rgba(39, 104, 255, 0.24),
    0 18px 34px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  transform: translateX(0);
  animation:
    md-search-glow 3.8s ease-in-out infinite,
    md-search-ring 3.8s ease-in-out infinite;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.web-chat-body:not([data-active-panel="support"]) .game-search-toggle:not([hidden]) {
  display: inline-grid !important;
}

.web-chat-body[data-active-panel="quickpay"] .game-search-toggle:not([hidden]) {
  display: inline-grid !important;
}

.web-chat-body[data-active-panel="quickpay"] .game-search-shell.is-open .game-search-toggle {
  display: none !important;
}

.web-chat-body[data-active-panel="quickpay"].is-game-search-open .purchase-guide-toggle {
  display: none;
}

.game-search-toggle::after {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: 22px;
  border: 1px solid rgba(139, 214, 255, 0.58);
  opacity: 0;
  animation: md-search-halo 3.8s ease-out infinite;
}

.game-search-toggle:hover,
.game-search-toggle:focus-visible {
  border-color: rgba(155, 177, 255, 0.66);
  box-shadow:
    0 0 0 5px rgba(76, 130, 255, 0.18),
    0 14px 30px rgba(39, 104, 255, 0.32),
    0 20px 38px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.game-search-toggle svg,
.game-search-input-wrap svg {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  fill: currentColor;
}

@keyframes md-search-glow {
  0%, 48%, 100% {
    box-shadow:
      0 0 0 4px rgba(76, 130, 255, 0.13),
      0 14px 28px rgba(39, 104, 255, 0.24),
      0 18px 34px rgba(0, 0, 0, 0.28);
    filter: saturate(1);
  }
  60% {
    box-shadow:
      0 0 0 8px rgba(85, 226, 207, 0.22),
      0 0 34px rgba(85, 226, 207, 0.42),
      0 18px 36px rgba(39, 104, 255, 0.38),
      0 20px 38px rgba(0, 0, 0, 0.3);
    filter: saturate(1.24) brightness(1.12);
  }
}

@keyframes md-search-ring {
  0%, 49%, 72%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  52% {
    transform: translateX(-1px) rotate(-7deg);
  }
  55% {
    transform: translateX(2px) rotate(8deg);
  }
  58% {
    transform: translateX(-2px) rotate(-7deg);
  }
  61% {
    transform: translateX(2px) rotate(6deg);
  }
  64% {
    transform: translateX(-1px) rotate(-4deg);
  }
  67% {
    transform: translateX(1px) rotate(3deg);
  }
}

@keyframes md-search-halo {
  0%, 46%, 100% {
    opacity: 0;
    transform: scale(0.84);
  }
  58% {
    opacity: 0.76;
    transform: scale(1);
  }
  78% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-search-toggle,
  .game-search-toggle::after {
    animation: none;
  }
}

.game-search-panel {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(23, 25, 31, 0.98);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
  transform-origin: center top;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-search-shell.is-open .game-search-panel {
  opacity: 1;
  transform: translateX(0) scaleX(1);
}

.game-search-shell.is-closing .game-search-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
}

.game-search-panel[hidden],
.game-search-toggle[hidden],
.game-search-results[hidden],
.game-search-modal[hidden],
.purchase-guide-panel[hidden] {
  display: none !important;
}

.purchase-guide-panel {
  width: min(520px, calc(100vw - 48px));
  max-height: min(610px, calc(100dvh - 146px - env(safe-area-inset-top, 0px)));
  overflow-y: auto;
  justify-self: start;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.035)),
    linear-gradient(135deg, rgba(85, 226, 207, 0.09), rgba(123, 60, 255, 0.12)),
    rgba(15, 17, 23, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 24px 58px rgba(0, 0, 0, 0.42);
  pointer-events: auto;
  transform-origin: top left;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  backdrop-filter: blur(42px) saturate(1.72);
  -webkit-backdrop-filter: blur(42px) saturate(1.72);
  transition:
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: none;
}

.purchase-guide-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.purchase-guide-shell.is-open .purchase-guide-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.purchase-guide-shell.is-closing .purchase-guide-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
}

.purchase-guide-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: start;
  gap: 12px;
}

.purchase-guide-kicker {
  display: block;
  color: #8eeef1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.purchase-guide-head h2 {
  margin: 3px 0 0;
  color: #f7f8ff;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0;
}

.purchase-guide-close {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0;
}

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

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

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

.purchase-guide-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.purchase-guide-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border-radius: 19px;
  background: rgba(15, 18, 25, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.purchase-guide-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 35% 25%, rgba(158, 248, 255, 0.38), transparent 42%),
    linear-gradient(135deg, rgba(39, 104, 255, 0.95), rgba(123, 60, 255, 0.82));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(39, 104, 255, 0.22);
}

.purchase-guide-card h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: 0;
}

.purchase-guide-card ol {
  margin: 9px 0 0;
  padding-left: 18px;
  color: #d7dae4;
  font-size: 13px;
  line-height: 1.36;
}

.purchase-guide-card li + li {
  margin-top: 5px;
}

.purchase-guide-note {
  margin: 13px 2px 1px;
  color: #aeb4c1;
  font-size: 13px;
  line-height: 1.35;
}

.game-search-input-wrap {
  min-width: 0;
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 14px;
  background: #101218;
  color: #aeb8ff;
}

.game-search-input-wrap input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f7f8ff;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.game-search-input-wrap input::placeholder {
  color: #8d94a5;
}

.game-search-close,
.game-search-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 28px;
  line-height: 1;
}
