/*
 * PlatSer Club · дизайн-правки v19
 * Подключается последним в index.html. Только визуальные правила, без изменения разметки.
 * Все селекторы начинаются с «:root body», чтобы перекрывать стили разделов,
 * которые приложение подгружает позже (их файлы подключаются после этого).
 *  1. Минимальные размеры текста: подписи 7–9 px были нечитаемы на телефоне.
 *  2. Список разделов профиля: единый размер заголовков и подписей.
 *  3. Личный диалог: без повторного имени в каждом пузыре, аватар — один на серию,
 *     действия под сообщением тише и не спорят с текстом.
 */

/* ---------- 1. Читаемость мелкого текста ---------- */

:root body .bottom-nav button > span:last-child {
  font-size: clamp(9.5px, 2.75vw, 11px);
  white-space: nowrap;
  letter-spacing: 0;
  line-height: 1.2;
}

/* Подписи в карточках и списках */
:root body .settings-list__section small,
:root body .settings-list__meta,
:root body .pcf-entry-copy small,
:root body .pet-care-grid small,
:root body .achievement small,
:root body .achievement-collection__note,
:root body .achievement-collection__progress small,
:root body .pet-about-empty small,
:root body .pet-care-report-button small,
:root body .vet-shortcut__copy span,
:root body .stat small,
:root body .nutrition-card__identity p,
:root body .nutrition-card__footer span {
  font-size: 12px;
  line-height: 1.4;
}

/* Служебные метки капителью: стиль сохраняем, но не мельче 10 px */
:root body .achievement-collection__count,
:root body .achievement__state,
:root body .id-strip small,
:root body .vet-shortcut__copy small,
:root body .nutrition-card__status,
:root body .nutrition-card__result small,
:root body .nutrition-card .eyebrow,
:root body .daily-gift-entry__copy small,
:root body .shop-preview-label {
  font-size: 10px;
}

/* «ккал / день», «г / день» были 7 px */
:root body .nutrition-card__result i {
  font-size: 11px;
  font-style: normal;
}

/* ---------- 2. Список разделов профиля ---------- */

:root body .settings-list > button {
  min-height: 60px;
}
/* Простые строки (Мои привилегии, Друзья, Email, Выйти) приводим к виду строк с подписью */
:root body .settings-list > button:not(.settings-list__section) > span:first-child {
  font-size: 15px;
  font-weight: 500;
  color: #1c3626;
}
:root body .settings-list__section strong,
:root body .settings-list__section.pcf-profile-entry strong {
  font-size: 15px;
  font-weight: 500;
}
:root body .settings-list__section small {
  margin-top: 2px;
  color: #63826f;
}

/* ---------- 3. Личный диалог ---------- */

/* В переписке двоих имя автора в каждом пузыре избыточно: оставляем его для экранных
:root body дикторов,
:root body визуально скрываем. Имя в цитате ответа не затрагивается. */
:root body .direct-message__bubble > strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Серия сообщений собеседника: аватар только у последнего, промежутки плотнее */
:root body .direct-message:not(.is-own):has(+ .direct-message:not(.is-own)) .direct-message__avatar {
  visibility: hidden;
}
:root body .direct-message.is-own:has(+ .direct-message.is-own) .direct-message__bubble {
  border-bottom-right-radius: 17px;
}
:root body .direct-message:not(.is-own):has(+ .direct-message:not(.is-own)) .direct-message__bubble {
  border-bottom-left-radius: 17px;
}

/* Действия под сообщением: компактнее и спокойнее, полная яркость при наведении/фокусе */
:root body .direct-message__actions {
  margin-top: 3px;
  gap: 12px;
  font-size: 12px;
  opacity: .62;
  transition: opacity .15s ease;
}
:root body .direct-message:hover .direct-message__actions,
:root body .direct-message__actions:focus-within,
:root body .direct-message__actions:has(.is-liked) {
  opacity: 1;
}
:root body .direct-message__actions button {
  min-height: 28px;
}

@media (prefers-reduced-motion: reduce) {
:root body .direct-message__actions { transition: none; }
}

/* Плитки ветпаспорта: подпись занимает ровно две строки, заголовки стоят на одной линии */
:root body .pet-care-grid small {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ---------- 4. Экран входа для гостей (тёмный) ---------- */

/* Главное действие — создать PlatSer ID: самая яркая кнопка экрана.
   «Войти» и «Посмотреть карточку» — спокойные стеклянные кнопки. */
:root body .auth-gateway--choice .auth-secondary {
  background: linear-gradient(180deg, #f9f7f2, #f3f0e6);
  border-color: #e7e6d4;
  color: #254832;
  box-shadow: 0 12px 30px rgba(6, 19, 11, .35), inset 0 1px 0 #fff;
}
/* «Создать PlatSer ID за 2 минуты» — в одну строку на обычных телефонах (от 370 px);
   на совсем узких экранах остаётся прежний перенос. */
@media (min-width: 370px) {
  :root body .auth-gateway--choice .auth-secondary > span {
    white-space: nowrap;
    font-size: clamp(13.5px, 3.65vw, 15px);
  }
}
:root body .auth-gateway--choice .auth-primary,
:root body .auth-gateway--choice .pcv-demo-button {
  background: linear-gradient(145deg, rgba(36, 70, 49, .62), rgba(12, 30, 19, .55));
  border-color: rgba(199, 211, 175, .28);
  color: #ebe9df;
  box-shadow: none;
}
:root body .auth-gateway--choice .pcv-demo-button * {
  color: inherit;
}

/* Контраст текста на тёмном фоне (был ниже 4.5:1) */
:root body .auth-gateway--choice .auth-choice__copy p {
  color: #bdc7af;
}
:root body .auth-gateway--choice .auth-storefront {
  color: #b9caa6;
}
:root body .auth-gateway--choice .auth-install-promotion__dismiss {
  color: #a1b699;
}

/* Подписи 7–8 px в карточках «Возможности» и «Приложение без загрузки» */
:root body .auth-explore small {
  font-size: 10px;
}
:root body .auth-install-promotion__copy small {
  font-size: 9px;
  letter-spacing: .12em;
  padding-right: 36px; /* место под «Позже» в правом верхнем углу */
}
:root body .auth-install-promotion__copy span {
  font-size: 11px;
  white-space: normal;
}
:root body .auth-install-promotion__copy strong {
  font-size: 13px;
}
