/* Auth forms — compact fit, FAQ / contacts panel language. */

.qm-frame.qm-faq.qm-auth {
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  text-align: center;
  gap: 8px;
  padding: 10px 14px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.qm-auth .qm-faq__panel {
  width: min(100%, 22rem);
  margin-inline: auto;
  padding: 10px 12px 12px;
  gap: 8px;
  flex: 0 1 auto;
  min-height: 0;
}

.qm-auth .qm-title {
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 20px;
  line-height: 1.15;
}

.qm-auth .qm-form {
  width: 100%;
  max-width: none;
  gap: 6px;
}

.qm-auth__grid,
.qm-auth__checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.qm-auth .qm-field {
  gap: 3px;
  min-width: 0;
}

.qm-auth .qm-field label {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.qm-auth .qm-input {
  background: rgba(2, 6, 14, 0.55);
  border-color: var(--qm-line);
  border-radius: var(--qm-radius);
  min-height: 38px;
  padding: 6px 10px;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.qm-auth .qm-input:hover {
  border-color: var(--qm-cyan-soft);
}

.qm-auth .qm-input:focus,
.qm-auth .qm-input:focus-visible {
  outline: none;
  border-color: var(--qm-cyan);
  box-shadow: 0 0 0 1px var(--qm-cyan-soft);
}

.qm-auth .qm-field--check {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.qm-auth .qm-field--check label {
  flex: 1;
  min-width: 0;
  color: var(--qm-text);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0;
}

.qm-auth .qm-field--check .qm-field__error {
  flex-basis: 100%;
  padding-left: 28px;
}

.qm-auth .qm-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex-shrink: 0;
  border: 1px solid var(--qm-text);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.qm-auth .qm-checkbox:checked {
  border-color: var(--qm-accent);
  background:
    linear-gradient(var(--qm-accent), var(--qm-accent)) center / 8px 8px no-repeat;
}

.qm-auth .qm-checkbox:focus-visible {
  outline: 1px solid var(--qm-accent-soft);
  outline-offset: 2px;
}

.qm-auth__legal {
  color: var(--qm-cyan);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.qm-auth__legal:hover,
.qm-auth__legal:focus-visible {
  color: var(--qm-accent);
}

.qm-auth .qm-btn--primary {
  color: #1a1408;
  background: linear-gradient(180deg, #ffe27a 0%, var(--qm-accent) 46%, #d4a41c 100%);
  border-color: #c48f10;
  border-top-color: #fff1a8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -2px 3px rgba(110, 72, 0, 0.28),
    0 4px 0 #b07d0c,
    0 8px 16px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(248, 198, 46, 0.24);
}

.qm-auth .qm-btn--primary:hover {
  background: linear-gradient(180deg, #ffea96 0%, #ffd040 46%, #e0b020 100%);
  border-color: #d4a41c;
  border-top-color: #fff8d0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -2px 3px rgba(110, 72, 0, 0.22),
    0 5px 0 #c48f10,
    0 10px 18px rgba(0, 0, 0, 0.4),
    0 0 22px rgba(248, 198, 46, 0.32);
}

.qm-auth .qm-btn--primary:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 2px 5px rgba(80, 50, 0, 0.38),
    0 1px 0 #b07d0c,
    0 4px 10px rgba(0, 0, 0, 0.32);
}

.qm-auth .qm-btn--block {
  width: 100%;
  min-height: 42px;
  height: 42px;
  margin-top: 2px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding-top: 0;
  padding-bottom: 0;
}

.qm-auth .qm-auth-alt {
  margin: 0;
  width: 100%;
  max-width: 22rem;
  text-align: center;
  font-size: 12px;
  flex-shrink: 0;
}

.qm-auth .qm-auth-alt + .qm-auth-alt {
  margin-top: -6px;
}

.qm-auth .qm-tagline {
  margin: 0;
  color: var(--qm-muted);
  font-size: 14px;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .qm-frame.qm-faq.qm-auth {
    padding: 12px 24px 10px;
    gap: 8px;
  }

  .qm-auth .qm-faq__panel {
    width: min(100%, 22rem);
    padding: 12px 14px 14px;
    gap: 8px;
  }

  .qm-auth .qm-title {
    font-size: 22px;
  }

  .qm-auth__grid,
  .qm-auth__checks,
  .qm-auth__grid--login {
    grid-template-columns: 1fr;
  }

  .qm-auth .qm-form {
    gap: 6px;
  }

  .qm-auth .qm-input {
    min-height: 38px;
  }

  .qm-auth .qm-btn--block {
    min-height: 42px;
    height: 42px;
  }

  .qm-auth .qm-auth-alt {
    max-width: 22rem;
  }
}

@media (min-width: 1024px) {
  .qm-frame.qm-faq.qm-auth {
    padding: 12px 28px 10px;
  }

  .qm-auth .qm-title {
    font-size: 24px;
  }
}

@media (max-width: 767px) {
  .qm-frame.qm-faq.qm-auth {
    padding: 8px 10px 8px;
    gap: 8px;
  }

  .qm-auth .qm-faq__panel {
    padding: 10px;
    gap: 8px;
  }

  .qm-auth .qm-title {
    font-size: 20px;
  }
}

@media (max-height: 740px) {
  .qm-frame.qm-faq.qm-auth {
    padding-block: 8px;
    gap: 8px;
    justify-content: flex-start;
  }

  .qm-auth .qm-title {
    font-size: 20px;
  }

  .qm-auth .qm-input,
  .qm-auth .qm-btn--block {
    min-height: 42px;
    height: auto;
  }

  .qm-auth .qm-btn--block {
    height: 42px;
    flex-shrink: 0;
  }
}

@supports (-webkit-touch-callout: none) {
  .qm-auth .qm-input {
    font-size: 16px;
  }

  .qm-auth .qm-checkbox {
    width: 20px;
    height: 20px;
  }
}
