/*
 * Subset of in-game HUD modal chrome (trade / outfit panels from `game.js`) so the
 * wallet + display-name gate matches the live game on `/play`, and the homepage can
 * load the same look without importing `game.js`.
 *
 * Served at `/site/css/kintara-modal-shared.css` — keep in sync with
 * `site/css/style2/kintara-modal-shared.css` (no @import; single request avoids
 * browser retry loops on localhost HTTPS).
 */

.kintara-auth__backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(8, 10, 20, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.kintara-auth__panel.kintara-trade__panel {
  /* Bumped from 440 → 560 so the onboarding modal reads as a primary screen
   * (matches the orange Play landing in visual weight) and the input + CTA
   * have enough horizontal room to breathe. */
  width: min(560px, calc(100vw - 16px));
  max-height: none;
}

.kintara-auth__body.kintara-trade__body {
  padding: 22px 22px 24px;
}

.kintara-auth__sub {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #c8ced8;
  opacity: 0.92;
  text-align: center;
}

.kintara-auth__err {
  display: none;
  font-size: 11px;
  font-weight: 700;
  color: #ffb4b4;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(120, 28, 28, 0.35);
  border: 1px solid rgba(255, 140, 140, 0.28);
}

.kintara-auth__err[data-visible='true'] {
  display: block;
}

.kintara-auth__input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 2px solid #050505;
  background: rgba(12, 14, 18, 0.96);
  color: #eceff3;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
  margin-bottom: 0;
  font-family: inherit;
}

.kintara-auth__input:focus {
  outline: none;
  border-color: #2a6b45;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(74, 159, 114, 0.35);
}

/* Layout for the Create-Your-Account step:
 *   - Input is full-width.
 *   - Hint sits directly under the input with breathing room above + below.
 *   - CTA row is centered with another visible gap so the button reads as
 *     a deliberate confirmation rather than a chip glued to the hint. */
.kintara-auth__nameStep {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kintara-auth__hint {
  margin: 6px 0 14px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.82;
  color: #b8bec8;
  letter-spacing: 0.02em;
  text-align: center;
}

.kintara-auth__nameStep-cta {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.kintara-auth__cta {
  min-width: 220px;
  padding: 12px 26px !important;
  font-size: 14px !important;
  letter-spacing: 0.04em;
}

.kintara-auth__btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kintara-auth__btn-row .kintara-trade__btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 11px;
}

.kintara-trade__panel {
  pointer-events: auto;
  user-select: none;
  box-sizing: border-box;
  width: min(470px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  height: auto;
  max-height: min(500px, 96vh);
  padding: 10px 10px 8px;
  border-radius: 14px;
  border: 2px solid #0a0a0a;
  background: linear-gradient(165deg, #6f7379 0%, #4a4d52 38%, #35383d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24),
    0 2px 0 rgba(0, 0, 0, 0.42);
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
  color: #eceff3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.kintara-trade__header {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  margin: -2px -2px 0;
  padding: 4px 2px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
}

.kintara-trade__header:active {
  cursor: grabbing;
}

.kintara-trade__headerSpacer {
  width: 32px;
  height: 1px;
  pointer-events: none;
}

.kintara-trade__title {
  margin: 0;
  min-width: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #eceff3;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22), 0 -1px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.25;
}

/* Onboarding modal title needs to read at the same visual weight as the rest
 * of the larger auth panel — the 13px chrome title looks tiny next to the
 * 15px input. Scoped to the auth panel so other trade panels stay unchanged. */
.kintara-auth__panel .kintara-trade__title {
  font-size: 16px;
  letter-spacing: 0.05em;
}

.kintara-auth__panel .kintara-trade__header {
  padding: 8px 4px 8px;
}

.kintara-trade__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 6px 4px 6px 8px;
  border-radius: 10px;
  border: 2px solid #050505;
  background: linear-gradient(180deg, #0c0d10, #14161c);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kintara-trade__btn {
  margin: 0;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 10px;
  font-family: inherit;
  border: 2px solid #050505;
  background: linear-gradient(180deg, #5c6066, #3f4247);
  color: #e6e9ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
  touch-action: manipulation;
}

.kintara-trade__btn:hover {
  background: linear-gradient(180deg, #6a6e75, #4a4e54);
}

.kintara-trade__btn:active {
  transform: translateY(2px) scale(0.94);
  filter: brightness(0.88);
}

.kintara-trade__btn--primary {
  background: linear-gradient(180deg, #3d8f63, #2a6b45);
  color: #fff;
}

.kintara-trade__btn--primary:hover {
  background: linear-gradient(180deg, #4a9f72, #357a52);
}

.kintara-trade__btn--muted {
  background: linear-gradient(180deg, #4a4d52, #32353a);
  color: #d0d4dc;
}

.kintara-trade__btn--muted:hover {
  background: linear-gradient(180deg, #565b62, #3d4248);
}

/* Outfit-style preview frame (dashboard character slot) */
.kintara-outfit__viewport {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid #050505;
  margin: 0;
  background: linear-gradient(180deg, #0c0d10, #14161c);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.45), inset 0 2px 10px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
