/* Область: public. Правки под старый дизайн, без inline-стилей. */

/* ---------- Управление видимостью без inline style ----------
   У классов ниже задан display, поэтому атрибут hidden сам по себе не сработает. */
.pub-auth-addr-panel[hidden],
.pub-support-body [hidden] {
  display: none !important;
}

/* ---------- Модалка регистрации организации (порт RegisterModal) ---------- */
.pub-auth-tab-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* В старом сайте .field — flex-колонка с gap 5px, без дополнительного margin.
   Возвращаем это внутри своих страниц/модалки. */
.pub-auth-tab-body .field,
.pub-support-body .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 0;
}

.pub-auth-cat-chips {
  gap: 6px;
}

.pub-auth-cat-chips .cat-chip svg {
  flex-shrink: 0;
}

.pub-auth-addr-panel .dropdown-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Страница «Техническая поддержка» ---------- */
.pub-support-inner {
  max-width: 792px;
}

.pub-support-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pub-support-card--chat {
  height: min(72vh, 640px);
  min-height: 340px;
}

.pub-support-card--chat .support-chat {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pub-support-card--chat .chat-wrap {
  height: 100%;
}

.pub-support-card--guest,
.pub-support-card--success {
  height: auto;
  max-width: 560px;
  margin: 0 auto;
}

.pub-support-card--success {
  max-width: 420px;
}

.pub-support-body {
  overflow: visible;
}

.pub-support-card--success .modal-body {
  gap: 12px;
}

@media (max-width: 640px) {
  .pub-support-inner {
    padding-bottom: 12px;
  }

  /* Высота чата поддержки: ровно между шапкой и нижним меню. */
  .pub-support-card--chat {
    height: calc(100dvh - var(--header-h) - var(--tabbar-space, 58px) - 40px);
    min-height: 320px;
  }

  .pub-support-card--guest,
  .pub-support-card--success {
    max-width: 100%;
  }
}
