/* Panel-only: step visibility + post-auth white screen. Visual styles from web.max.ru CSS. */
.max-auth-page .auth-step {
  display: none;
}

.max-auth-page .auth-step.active {
  display: block;
}

.max-auth-page .auth-error {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-negative, #e53935);
}

.max-auth-page .auth-step-actions--link {
  text-align: center;
}

.max-auth-page .qr-phone-link,
.max-auth-page .back-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  color: var(--text-themed, #007aff);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
}

.max-auth-page .max-footer-qr,
.max-auth-page .max-footer-phone {
  margin-top: var(--size-16, 16px);
  width: 100%;
  text-align: center;
}

.max-auth-page .auth.auth--qr.auth--regular.svelte-vywflk > .footer.svelte-vywflk {
  flex: 1;
  justify-content: flex-end;
  padding-bottom: var(--size-44, 44px);
}

.max-auth-page .auth.auth--qr.auth--regular.svelte-vywflk > .footer.svelte-vywflk .max-footer-phone {
  margin-top: 0;
}

.max-auth-page .max-legal {
  display: block;
  line-height: 1.45;
}

.max-popover[hidden] {
  display: none !important;
}

.max-popover {
  position: fixed;
  z-index: 1000;
  min-width: 180px;
  padding: var(--size-8, 8px);
  border-radius: var(--border-radius-common-l, 16px);
  background: var(--background-primary, #fff);
  border: 1px solid var(--bubbles-system-stroke-step-2, rgba(0, 0, 0, 0.1));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.max-popover--help {
  max-width: 260px;
  padding: var(--size-12, 12px) var(--size-16, 16px);
  background: rgba(12, 13, 14, 0.88);
  border: none;
}

.max-popover__item {
  display: block;
  width: 100%;
  padding: var(--size-10, 10px) var(--size-12, 12px);
  border: none;
  border-radius: var(--border-radius-common-m, 12px);
  background: transparent;
  color: var(--text-primary);
  font: 400 15px/20px Roboto, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.max-popover__item:hover,
.max-popover__item--active {
  background: var(--background-tertiary);
}

.max-popover__help-text {
  margin: 0;
  color: #fff;
  font: 400 13px/18px Roboto, system-ui, sans-serif;
}

.max-auth-page .dropdown.svelte-1cug6p.max-country-dropdown[hidden],
.max-auth-page #country-dropdown[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.max-auth-page #country-dropdown:not([hidden]) {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-width: 336px;
  max-height: 280px;
  z-index: 30;
  overflow: hidden;
  --input-width: 100%;
  box-sizing: border-box;
}

.max-auth-page .max-country-search {
  width: 100%;
  background: var(--background-tertiary);
  border-radius: var(--border-radius-common-m, 12px);
  padding: 10px 12px;
  border: none;
  color: var(--text-primary);
}

.max-auth-page #country-list .scrollable,
.max-auth-page #country-list {
  max-height: 260px;
  overflow: auto;
}

.max-auth-page #country-list .dropdownItem.svelte-1cug6p {
  width: 100%;
  text-align: left;
}

html.max-auth-success,
html.max-auth-success body {
  background: #fff !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

html.max-auth-success .max-auth-page {
  display: none;
}
