/* FACEIT verification modal — flow states, profile cards, loaders */
:root {
  --vm-orange: #ff5500;
  --vm-orange-dark: #e04b00;
  --vm-line: #2d2d2d;
  --vm-line-soft: #303030;
  --vm-muted: rgba(255, 255, 255, .5);
}

/* ---------- open / close state ---------- */
.vmodal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.vmodal-overlay.show .vmodal {
  transform: none;
  opacity: 1;
}

.vmodal-overlay.locked .vmodal {
  pointer-events: none;
}

/* ---------- steps ---------- */
.vmodal-step {
  display: none;
}

.vmodal-step.active {
  display: block;
  animation: vmStepIn .28s cubic-bezier(.22, 1, .36, 1);
}

@keyframes vmStepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- inputs ---------- */
.vmodal-input {
  font-family: Rajdhani, sans-serif;
  font-size: 15px;
  letter-spacing: .02em;
}

.vmodal-input::placeholder {
  color: rgba(255, 255, 255, .28);
}

.vmodal-field-row:focus-within {
  border-color: rgba(255, 85, 0, .55);
  box-shadow: 0 0 0 2px rgba(255, 85, 0, .12);
}

.vmodal-input.invalid,
.vmodal-field-row.invalid {
  border-color: #e0442a;
}

.vmodal-error {
  display: none;
  margin: 0 0 .75rem;
  padding: 8px 10px;
  border: 1px solid rgba(224, 68, 42, .45);
  background: rgba(224, 68, 42, .1);
  border-radius: 8px;
  color: #ff8f7a;
  font-size: 12.5px;
  line-height: 1.35;
}

.vmodal-error.show {
  display: block;
}

/* ---------- primary button loading state ---------- */
.vmodal-btn-primary {
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}

.vmodal-btn-primary:disabled {
  cursor: default;
  opacity: .85;
}

.vmodal-btn-primary.is-loading {
  pointer-events: none;
}

.vmodal-loader {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 16px;
}

.vmodal-loader i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  display: block;
  animation: vmDot 1s ease-in-out infinite;
}

.vmodal-loader i:nth-child(2) { animation-delay: .14s; }
.vmodal-loader i:nth-child(3) { animation-delay: .28s; }

@keyframes vmDot {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* ---------- found profile card (FACEIT) ---------- */
.vmodal-profile {
  display: none;
  align-items: center;
  gap: 13px;
  background: #111;
  border: 1px solid var(--vm-line);
  border-radius: 10px;
  padding: 13px;
  margin: 0 0 1rem;
}

.vmodal-profile.show {
  display: flex;
  animation: vmStepIn .3s cubic-bezier(.22, 1, .36, 1);
}

.vmodal-avatar-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #262626;
  border: 1px solid #3a3a3a;
}

.vmodal-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vmodal-avatar[src=""],
.vmodal-avatar:not([src]) {
  display: none;
}

.vmodal-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: rgba(255, 255, 255, .55);
  background: #242424;
}

.vmodal-profile-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.vmodal-profile-nick,
.vmodal-steam-name {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vmodal-games {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.vmodal-level {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: none;
}

.vmodal-level.show {
  display: block;
}

.vmodal-level img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- steam fallback card ---------- */
.vmodal-steam-fallback {
  display: none;
  background: #101010;
  border: 1px solid var(--vm-line-soft);
  border-radius: 10px;
  padding: 14px;
  margin: 0 0 1rem;
}

.vmodal-steam-fallback.show {
  display: block;
  animation: vmStepIn .3s cubic-bezier(.22, 1, .36, 1);
}

.vmodal-steam-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #f5a623;
}

.vmodal-steam-status svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.vmodal-steam-copy {
  margin: 6px 0 12px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--vm-muted);
}

.vmodal-steam-player {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.vmodal-steam-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: #242424;
  border: 1px solid #3a3a3a;
  display: block;
}

.vmodal-steam-avatar[hidden] {
  display: none;
}

.vmodal-steam-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.vmodal-steam-game {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--vm-muted);
}

.vmodal-steam-game img {
  width: 13px;
  height: 13px;
}

.vmodal-dota-rank {
  text-align: right;
  flex: 0 0 auto;
}

.vmodal-dota-rank-name {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: #fff;
}

.vmodal-dota-rank-place {
  font-size: 11px;
  color: var(--vm-muted);
  min-height: 1em;
}

/* ---------- success step ---------- */
.vmodal-success-wrap {
  text-align: center;
  padding: 4px 0 2px;
}

.vmodal-noemail-icon {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
  animation: vmPulse 2.4s ease-in-out infinite;
}

@keyframes vmPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: .86; }
}

.vmodal-success-title {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}

.vmodal-success-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--vm-muted);
}

.vmodal-divider {
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}

.vmodal-btn-steam {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: .8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--vm-orange);
  color: #fff;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}

.vmodal-btn-steam:hover {
  background: var(--vm-orange-dark);
  box-shadow: 0 6px 22px rgba(255, 85, 0, .38);
  transform: translateY(-1px);
}

.vmodal-btn-steam:disabled {
  opacity: .8;
  cursor: default;
  transform: none;
}

@media (max-width: 480px) {
  .vmodal-body {
    padding: 1rem 1.1rem 1.2rem;
  }

  .vmodal-hero {
    height: 118px;
  }

  .vmodal-steam-player {
    align-items: flex-start;
  }

  .vmodal-dota-rank {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vmodal-step.active,
  .vmodal-profile.show,
  .vmodal-steam-fallback.show,
  .vmodal-noemail-icon,
  .vmodal-loader i {
    animation: none !important;
  }
}

/* ---------- backend offline hint ---------- */
.vm-offline {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 100000;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border: 1px solid rgba(224, 68, 42, .5);
  border-radius: 10px;
  background: rgba(26, 12, 10, .96);
  color: #ffb4a4;
  font-family: Rajdhani, sans-serif;
  font-size: 12.5px;
  letter-spacing: .03em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
  animation: vmStepIn .28s cubic-bezier(.22, 1, .36, 1);
}