/* Страница авторизации — в стиле интерфейса чатов (тёмная тема) */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--y-space-xl);
  background: #000;
  position: relative;
}

.auth-container {
  position: relative;
  z-index: 1;
  background: #18191a;
  border: none;
  border-radius: 24px;
  padding: var(--y-space-xl);
  width: 100%;
  max-width: 420px;
  box-shadow: none;
  animation: authFadeInUp 0.6s ease-out both;
}

@keyframes authFadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Логотип как в боковой панели: картинка Юстихаб + «Чаты» + BETA */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  margin-bottom: 48px;
}
.auth-logo-img {
  height: 28px;
  width: auto;
  max-width: 160px;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}
.auth-logo-chats {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: -5px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-logo-beta {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: -10px;
  color: var(--y-badge);
  border: 1px solid var(--y-badge);
  border-radius: 6px;
  padding: 2px 6px;
  align-self: center;
  flex-shrink: 0;
}


.auth-input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: var(--y-space-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #2a2b2c;
  border-radius: var(--y-radius-md);
  color: rgb(243, 244, 246);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.auth-input::-moz-placeholder {
  color: rgb(107, 114, 128);
}
.auth-input::placeholder {
  color: rgb(107, 114, 128);
}
.auth-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.auth-input:disabled {
  opacity: 0.55;
}

/* Поле ввода телефона: скруглённое, крупный шрифт, текст по центру */
.auth-container input[type="tel"].auth-input {
  border-radius: var(--y-radius-xl);
  font-size: 20px;
  text-align: center;
  letter-spacing: 0.02em;
}
.auth-container input[type="tel"].auth-input::-moz-placeholder {
  text-align: center;
}
.auth-container input[type="tel"].auth-input::placeholder {
  text-align: center;
}

.auth-button {
  width: 100%;
  padding: 14px 24px;
  margin-top: var(--y-space-xs);
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: var(--y-radius-xl);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-button:hover:not(:disabled) {
  background: #2563eb;
}
.auth-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-button--secondary {
  display: block;
  margin-top: var(--y-space-md);
  text-align: center;
  text-decoration: none;
  background: transparent;
  color: rgb(243, 244, 246);
  border: 1px solid #2a2b2c;
  padding: 14px 24px;
  border-radius: var(--y-radius-xl);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.auth-button--secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.auth-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: rgb(156, 163, 175);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  padding: var(--y-space-xs);
  margin-top: var(--y-space-sm);
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.auth-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgb(243, 244, 246);
}

.auth-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: var(--y-space-sm);
  width: 100%;
}

.auth-link--ghost {
  background: none !important;
  border: none !important;
  padding: var(--y-space-xs) 0;
  margin: 0;
  width: auto;
  display: inline-block;
}
.auth-link--ghost:hover {
  background: none !important;
  text-decoration: underline;
}

.auth-phone-display {
  text-align: center;
  margin-bottom: var(--y-space-md);
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

/* 4 отдельных поля для кода подтверждения */
.auth-code-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--y-space-md);
}
.auth-code-digit {
  width: 56px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #2a2b2c;
  border-radius: 10px;
  color: rgb(243, 244, 246);
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.auth-code-digit:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.auth-code-digit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-error {
  background: var(--y-error-bg);
  color: var(--y-error);
  padding: 12px 16px;
  border-radius: var(--y-radius-md);
  margin-bottom: var(--y-space-md);
  font-size: 14px;
}

.auth-lawyer-title {
  font-size: 18px;
  font-weight: 600;
  color: rgb(243, 244, 246);
  margin: 0 0 var(--y-space-xs);
  text-align: center;
}

.auth-lawyer-hint {
  font-size: 14px;
  color: rgb(156, 163, 175);
  margin: 0 0 var(--y-space-md);
  text-align: center;
  line-height: 1.5;
}

.auth-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--y-space-sm);
  padding: var(--y-space-sm) var(--y-space-md);
  margin-bottom: var(--y-space-md);
  border-radius: var(--y-radius-md);
  font-size: 14px;
  font-weight: 500;
  background: rgba(176, 166, 199, 0.1);
  border: 1px solid var(--y-badge);
  color: var(--y-badge);
}
.auth-badge__switch {
  background: none;
  border: none;
  color: var(--y-accent);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
}

@media (max-width: 430px) {
  .auth-container {
    padding: var(--y-space-lg);
  }
  .auth-logo-chats {
    font-size: 24px;
  }
}
.tooltip-wrapper {
  display: inline-flex;
  position: relative;
}
.tooltip-wrapper.tooltip-wrapper-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 20px;
  height: 20px;
}
.tooltip-wrapper-badge .attachment-check-badge {
  position: relative;
  top: 0;
  left: 0;
}
.tooltip-balloon {
  position: fixed;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  background: rgba(30, 30, 30, 0.95);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  max-width: 200px;
  width: -moz-max-content;
  width: max-content;
  white-space: normal;
  pointer-events: none;
  animation: tooltip-fade-in 0.15s ease-out;
}
.tooltip-balloon::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}
.tooltip-placement-top::before {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: rgba(30, 30, 30, 0.95);
}
.tooltip-placement-bottom::before {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: rgba(30, 30, 30, 0.95);
}
.tooltip-placement-left::before {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: rgba(30, 30, 30, 0.95);
}
.tooltip-placement-right::before {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: rgba(30, 30, 30, 0.95);
}
@keyframes tooltip-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.report-problem-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.75);
  isolation: isolate;
}

.report-problem-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #1e1e1e;
  border-radius: var(--y-radius-lg, 12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  padding: 24px;
  opacity: 1;
}

.report-problem-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--y-text-secondary, rgba(255, 255, 255, 0.7));
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--y-radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.report-problem-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--y-text-primary, #fff);
}

.report-problem-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--y-text-primary, #fff);
  margin: 0 0 16px;
  padding-right: 40px;
}

.report-problem-hint {
  font-size: 14px;
  color: var(--y-text-secondary, rgba(255, 255, 255, 0.7));
  margin: 0 0 10px;
}

.report-problem-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.report-problem-category {
  padding: 8px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--y-text-primary, #fff);
  background: #2d2d2d;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--y-radius-md, 8px);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.report-problem-category:hover {
  background: #383838;
}
.report-problem-category--selected {
  background: var(--y-accent, #3b82f6);
  border-color: var(--y-accent, #3b82f6);
  color: #fff;
}

.report-problem-label {
  display: block;
  font-size: 14px;
  color: var(--y-text-secondary, rgba(255, 255, 255, 0.7));
  margin-bottom: 6px;
}
.report-problem-required {
  color: var(--y-error, #ef4444);
}

.report-problem-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--y-text-primary, #fff);
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--y-radius-md, 8px);
  resize: vertical;
  min-height: 80px;
  margin-bottom: 16px;
}
.report-problem-textarea::-moz-placeholder {
  color: var(--y-text-tertiary, rgba(255, 255, 255, 0.5));
}
.report-problem-textarea::placeholder {
  color: var(--y-text-tertiary, rgba(255, 255, 255, 0.5));
}
.report-problem-textarea:focus {
  outline: none;
  border-color: var(--y-accent, #3b82f6);
}

.report-problem-paste-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--y-text-tertiary, rgba(255, 255, 255, 0.5));
}

.report-problem-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.report-problem-file-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.report-problem-btn--file {
  background: #2d2d2d;
  color: var(--y-text-secondary, rgba(255, 255, 255, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.report-problem-btn--file:hover:not(:disabled) {
  background: #383838;
  border-color: rgba(255, 255, 255, 0.25);
}
.report-problem-btn--file:disabled {
  opacity: 0.6;
}
.report-problem-files {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.report-problem-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: #2d2d2d;
  border-radius: var(--y-radius-md, 8px);
  font-size: 13px;
}
.report-problem-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--y-text-secondary, rgba(255, 255, 255, 0.85));
}
.report-problem-file-remove {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  margin-left: 8px;
  background: transparent;
  border: none;
  color: var(--y-text-tertiary, rgba(255, 255, 255, 0.5));
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
}
.report-problem-file-remove:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--y-text-primary, #fff);
}
.report-problem-file-hint {
  font-size: 12px;
  color: var(--y-text-tertiary, rgba(255, 255, 255, 0.5));
  margin: 0 0 16px;
}

.report-problem-error {
  font-size: 14px;
  color: var(--y-error, #ef4444);
  margin: 0 0 12px;
}

.report-problem-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.report-problem-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--y-radius-md, 8px);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.report-problem-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.report-problem-btn--secondary {
  background: #2d2d2d;
  color: var(--y-text-secondary, rgba(255, 255, 255, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.report-problem-btn--secondary:hover:not(:disabled) {
  background: #383838;
}
.report-problem-btn--primary {
  background: var(--y-accent, #3b82f6);
  color: #fff;
  border: none;
}
.report-problem-btn--primary:hover:not(:disabled) {
  filter: brightness(1.1);
}
/* Список чатов — стандарты Юстихаб */
.chat-list-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--chat-list-page-bg);
}

.chat-list-header {
  flex-shrink: 0;
  padding: var(--y-space-md) var(--y-space-xl);
}
.chat-list-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chat-list-header-logo img {
  height: 28px;
  width: auto;
  max-width: 160px;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}
.chat-list-header-chats {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: -5px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.chat-list-header-beta {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: -10px;
  color: var(--y-badge);
  border: 1px solid var(--y-badge);
  border-radius: 6px;
  padding: 2px 6px;
  align-self: center;
  flex-shrink: 0;
}

.chat-list-error-wrap {
  padding: 0 var(--y-space-xl) var(--y-space-xs);
}
.chat-list-error {
  background: var(--y-error-bg);
  color: var(--y-error);
  padding: 12px 16px;
  border-radius: var(--y-radius-md);
  font-size: 14px;
}
.chat-list-error-retry {
  margin-top: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--y-primary, #6366f1);
  background: transparent;
  border: 1px solid var(--y-primary, #6366f1);
  border-radius: var(--y-radius-md);
  cursor: pointer;
}
.chat-list-error-retry:hover {
  background: rgba(99, 102, 241, 0.08);
}

.search-by-phone {
  padding-top: 0;
  padding-bottom: var(--y-space-md);
  padding-left: var(--y-space-xl);
  padding-right: var(--y-space-xl);
  background: none;
}

.search-by-phone-row {
  display: flex;
  gap: var(--y-space-sm);
  align-items: center;
}

.search-by-phone-input {
  flex: 1;
  padding: 5px 16px;
  font-size: 15px;
  background: var(--y-bg-input);
  border: none;
  border-radius: 999px;
  color: var(--y-text-primary);
  font-family: inherit;
  transition: background 0.2s;
}
.search-by-phone-input::-moz-placeholder {
  color: var(--y-placeholder);
}
.search-by-phone-input::placeholder {
  color: var(--y-placeholder);
}
.search-by-phone-input:focus {
  outline: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.08);
}

.search-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
}
.search-spinner-inline {
  flex-shrink: 0;
}
@keyframes search-spin {
  to { transform: rotate(360deg); }
}

.search-results-section {
  margin-top: var(--y-space-sm);
}
.search-results-label {
  font-size: 12px;
  color: rgb(156, 163, 175);
  margin-bottom: 4px;
  margin-top: 8px;
}
.search-results-label:first-child {
  margin-top: 0;
}
.found-lawyer-row {
  margin-top: var(--y-space-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  transition: background 0.2s;
  border-radius: var(--y-radius-lg);
}
.found-lawyer-row .found-lawyer-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--y-accent) 0%, #a855f7 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  position: relative;
}
.found-lawyer-row .found-lawyer-avatar .chat-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
}
.found-lawyer-row .found-lawyer-avatar .found-lawyer-avatar-initials {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.found-lawyer-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--y-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Баннер «Есть новые обновления» — под поиском, над списком чатов (только мобильная версия) */
.update-available-banner {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--y-space-md);
  padding: 10px var(--y-space-xl);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.2) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.35);
  animation: update-banner-in 0.35s ease-out;
  touch-action: manipulation;
}
@keyframes update-banner-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.update-available-banner__text {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}
.update-available-banner__btn {
  flex-shrink: 0;
  padding: 8px 16px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: opacity 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.update-available-banner__btn:hover {
  opacity: 0.9;
}
.update-available-banner__btn:active {
  opacity: 0.85;
}

/* Прелоадер на месте кнопки — те же отступы, что у кнопки (8px 16px), чтобы высота баннера не менялась */
.update-available-banner__loader {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  min-width: 52px;
  box-sizing: border-box;
}
.update-available-banner__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
}

.chat-list-nothing {
  padding: var(--y-space-lg);
  text-align: center;
  font-size: 14px;
  color: var(--y-text-tertiary);
}

.chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
}

.chat-list-content {
  min-height: 100%;
}
@media (max-width: 768px) {
  .chat-list-content {
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .chat-list-content--no-transition {
    transition: none;
  }
  .chat-list-pull-indicator {
    transition: height 0.28s cubic-bezier(0.33, 1, 0.68, 1), min-height 0.28s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .chat-list-pull-indicator--no-transition {
    transition: none;
  }
}

/* Зона тяги: надпись строго по вертикальному центру между верхним блоком и списком чатов */
.chat-list-pull-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--y-text-tertiary);
  font-size: 14px;
  position: relative;
  /* Плавное возвращение при отпускании задаётся в @media (max-width: 768px) */
}

.chat-list-pull-indicator .chat-list-pull-spinner,
.chat-list-pull-indicator .chat-list-pull-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.chat-list-pull-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.chat-list-pull-text {
  white-space: nowrap;
}

.chat-item {
  display: flex;
  padding: var(--y-space-md) var(--y-space-xl);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}
/* Hover только при наведении мышью; на мобильном при прокрутке не срабатывает */
@media (hover: hover) {
  .chat-item:hover {
    background: var(--y-bg-card-hover);
  }
}
/* Подсветка при тапе/клике — темнее основного фона */
.chat-item:active {
  background: rgba(0, 0, 0, 0.25);
}
.chat-item.selected {
  background: rgba(0, 0, 0, 0.25);
}

.chat-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--y-accent) 0%, #a855f7 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--y-space-md);
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
}
.chat-avatar-initials {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-avatar--system {
  background: #000 !important;
}

/* Обёртка для градиентной обводки аватарки системного чата */
.chat-avatar-wrap--system {
  display: flex;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  margin-right: var(--y-space-md);
  flex-shrink: 0;
}

.chat-avatar-wrap--system .chat-avatar {
  margin-right: 0;
}

.chat-avatar-system-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.chat-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-name-verified {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.chat-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--y-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-time {
  font-size: 12px;
  color: var(--y-text-tertiary);
  flex-shrink: 0;
  margin-left: var(--y-space-xs);
}

.chat-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--y-space-xs);
}
.chat-preview {
  font-size: 15px;
  color: var(--y-text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-preview-deleted {
  font-style: italic;
}
.chat-preview-typing {
  font-style: italic;
  color: var(--y-text-tertiary);
}
.chat-list-message-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 18px;
  color: var(--message-status-delivered);
}
.chat-list-message-status.sent {
  color: var(--y-text-tertiary);
}
.chat-list-message-status.delivered {
  color: var(--message-status-delivered);
}
.chat-list-message-status.read {
  color: var(--message-status-read);
}
.unread-badge {
  background: var(--y-accent);
  color: #fff;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.chat-list-footer {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--y-space-md);
  padding: var(--y-space-md) var(--y-space-xl);
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-list-footer-left {
  flex: 1;
  min-width: 0;
}
.chat-list-footer-report-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--y-text-secondary, rgba(255, 255, 255, 0.7));
  border-radius: var(--y-radius-lg, 10px);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.chat-list-footer-report-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--y-text-primary, #fff);
}
.chat-list-footer-report-btn:focus-visible {
  outline: 2px solid var(--y-accent, #3b82f6);
  outline-offset: 2px;
}
.chat-list-footer-profile {
  display: flex;
  align-items: center;
  gap: var(--y-space-md);
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: var(--y-radius-lg);
  transition: background 0.2s;
}
.chat-list-footer-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--y-accent) 0%, #a855f7 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  position: relative;
}
.chat-list-footer-avatar-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
  display: block;
}
.chat-list-footer-avatar-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-list-footer-user {
  font-size: 15px;
  color: var(--y-text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-list-footer-popover {
  position: absolute;
  bottom: 100%;
  left: var(--y-space-xl);
  margin-bottom: 4px;
  min-width: 160px;
  background: var(--y-bg-card);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  z-index: 100;
}
.chat-list-footer-popover-item,
.chat-list-footer-popover-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  min-height: 44px;
  font-size: 14px;
  color: var(--y-text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.chat-list-footer-popover-item:hover:not(:disabled),
.chat-list-footer-popover-logout:hover {
  background: var(--y-bg-card-hover);
}
.chat-list-footer-popover-item:disabled {
  cursor: default;
  opacity: 0.8;
}
.chat-list-footer-popover-item--muted {
  cursor: default;
  color: var(--y-text-tertiary);
  font-size: 13px;
}
.chat-list-footer-popover-item--muted:hover {
  background: transparent;
}
.chat-list-footer-popover-logout svg {
  flex-shrink: 0;
  color: var(--y-text-secondary);
}

.chat-list-page .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--y-text-tertiary);
}

/* Мобильная версия: высота по экрану, шапка сверху и профиль внизу закреплены, скролл только у списка чатов */
@media (max-width: 768px) {
  .chat-list-page {
    position: relative;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  /* Продление фона списка в зону под экраном, чтобы не было чёрной полосы */
  .chat-list-page::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: max(env(safe-area-inset-bottom, 0px), 34px);
    background: var(--chat-list-page-bg);
    z-index: 1;
    pointer-events: none;
  }
  .chat-list-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--chat-list-page-bg);
    padding-top: calc(var(--y-space-md) + env(safe-area-inset-top, 0px));
    padding-left: calc(var(--y-space-xl) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--y-space-xl) + env(safe-area-inset-right, 0px));
    padding-bottom: var(--y-space-md);
  }
  .chat-list-page .search-by-phone {
    flex-shrink: 0;
    padding-left: calc(var(--y-space-xl) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--y-space-xl) + env(safe-area-inset-right, 0px));
  }
  .chat-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    z-index: 0;
  }
  .chat-name {
    font-size: 17px;
  }
  .chat-list-footer-user {
    font-size: 17px;
  }
  .chat-list-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: rgba(28, 28, 28, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--y-space-md) var(--y-space-xl);
    padding-left: calc(var(--y-space-xl) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--y-space-xl) + env(safe-area-inset-right, 0px));
  }
  .chat-list-page .loading {
    min-height: 0;
  }
}
.audio-player {
  width: 100%;
}

.audio-player-container {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0;
}

/* Компактный режим для превью в поле ввода и в сообщениях — в одну строку */
.audio-player--compact {
  max-height: 64px;
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  margin-left: 0;
  padding-left: 0;
  overflow: visible;
}

.audio-player--compact .audio-player-container {
  gap: 12px; /* отступ между кнопкой Play и волной */
  align-items: flex-start; /* кнопка скорости по верху */
  min-height: 0;
  max-height: 64px;
  margin-left: 0;
  padding-left: 0;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.audio-player--compact .audio-player-content {
  gap: 0;
  min-height: 0;
  min-width: 80px; /* не даём контенту схлопнуться — иначе волна не отображается */
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
}

/* Волна заполняет только область от Play до кнопки удаления, не выходя за неё */
.audio-player--compact .audio-player-waveform {
  height: 32px;
  min-height: 32px;
  flex: 1;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
/* На мобильном контейнер волны не должен схлопываться в 0 — иначе WaveSurfer не отрисует */
@media (max-width: 768px) {
  .audio-player--mobile.audio-player--compact .audio-player-waveform {
    min-width: 120px;
  }
}

.audio-player-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 9999px; /* более мягкое скругление углов */
  background: #6366f1;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.audio-player-play-btn:hover {
  background: #5558e3;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.audio-player-play-btn:active {
  transform: scale(0.98);
}

/* Кнопка Play в превью — увеличена для удобства тапа */
.audio-player--compact .audio-player-play-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 9999px; /* более мягкое скругление */
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.audio-player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.audio-player-waveform {
  width: 100%;
  height: 60px;
  cursor: pointer;
  min-height: 60px;
}

.audio-player-waveform wave {
  cursor: pointer;
}

.audio-player-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.audio-player-time-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgb(156, 163, 175);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.audio-player-download {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: rgb(156, 163, 175);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  flex-shrink: 0;
}

.audio-player-download:hover {
  color: #fff;
}

/* В компактном режиме: блок волна + время снизу */
.audio-player-waveform-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.audio-player-time-below {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}
.message-bubble.other .audio-player-time-below {
  color: var(--y-text-secondary, rgba(0, 0, 0, 0.6));
}
/* Кнопка скорости: без обводки, надпись 1x/1.5x/2x по центру внутри кнопки */
.audio-player-speed-btn {
  flex-shrink: 0;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 28px;
  padding: 0;
  margin-left: 10px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(99, 102, 241, 0.25);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.audio-player-speed-btn:hover {
  background: rgba(99, 102, 241, 0.4);
  color: #fff;
}
.message-bubble.other .audio-player-speed-btn {
  color: var(--y-text-secondary, rgba(0, 0, 0, 0.8));
  background: rgba(99, 102, 241, 0.15);
}
.message-bubble.other .audio-player-speed-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  color: var(--y-text-secondary, rgba(0, 0, 0, 1));
}

/* При ошибке WaveSurfer — тот же UI, воспроизведение через скрытый <audio> */
.audio-player-hidden-audio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.audio-player-waveform-placeholder {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 4px;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* На мобильных до отрисовки волны — полоска-плейсхолдер; после ready снимаем класс */
.audio-player-waveform--mobile-placeholder {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 4px;
}

.audio-player-loading-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}
.message-bubble.other .audio-player-loading-label {
  color: var(--y-text-secondary, rgba(0, 0, 0, 0.5));
}
.audio-player--fallback-inline.audio-player--compact .audio-player-waveform-placeholder {
  min-width: 60px;
  flex: 1;
}

/* Мобильный режим: только нативный <audio>, без волны — гарантируем видимость и удобную кнопку Play */
.audio-player--mobile.audio-player--compact .audio-player-content {
  min-width: 100px;
}
.audio-player--mobile.audio-player--compact .audio-player-waveform {
  min-width: 80px;
  flex: 1;
}
@media (max-width: 768px) {
  .audio-player--compact .audio-player-play-btn {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
  }
}
/* Тёмно-серый фон (не чёрный) */
.message-context-menu {
  position: fixed;
  z-index: 10000;
  min-width: 180px;
  padding: 6px 0;
  background: #252529;
  border-radius: var(--y-radius-md, 8px);
}

.message-context-menu--exiting {
  animation: message-context-menu-exit 0.12s ease-in forwards;
}

/* В модальном режиме (мобильный) — в потоке, без fixed, уже и с большим скруглением */
.message-context-menu--inline {
  position: relative;
  left: auto;
  top: auto;
  margin-top: 16px;
  min-width: 200px;
  max-width: 240px;
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  border-radius: 16px;
}

.message-context-menu--inline .message-context-menu-item {
  padding: 14px 20px;
  font-size: 16px;
  gap: 14px;
}

.message-context-menu--inline .message-context-menu-item svg {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
}

.message-context-menu--inline .message-context-menu-status {
  margin-top: 8px;
  padding-top: 10px;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 14px;
}

@keyframes message-context-menu-enter {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes message-context-menu-exit {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* Приглушённые надписи и иконки (не чисто белые) */
.message-context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s ease;
}

/* При наведении — чуть светлее фона */
.message-context-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.message-context-menu-item:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.message-context-menu-item svg {
  flex-shrink: 0;
  opacity: 0.8;
  color: rgba(255, 255, 255, 0.8);
}

.message-context-menu-item-danger {
  color: #f87171;
}

.message-context-menu-item-danger:hover {
  background: rgba(248, 113, 113, 0.12);
}

.message-context-menu-item-danger svg {
  opacity: 0.9;
  color: #f87171;
}

/* Статус — дополнительная информация, более тёмный текст */
.message-context-menu-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  padding-left: 14px;
  padding-right: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.message-context-menu-status-icon {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
}

.message-context-menu-status-icon svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Прочитано — иконка синяя (как в Telegram) */
.message-context-menu-status--read .message-context-menu-status-icon {
  color: var(--message-status-read, #16cbff);
}

/* Inline (модалка): иконка статуса крупнее, как пункты меню */
.message-context-menu--inline .message-context-menu-status-icon svg {
  width: 22px;
  height: 22px;
}
/* ReactionPicker — панель выбора эмодзи реакций (как в Telegram) */

.reaction-picker {
  position: fixed;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 4px 4px 8px;
  background: var(--y-bg-elevated, #2d2d2d);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reaction-picker-strip {
  display: flex;
  align-items: center;
  gap: 2px;
}

.reaction-picker-emoji {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.reaction-picker-emoji:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.15);
}

.reaction-picker-expand {
  width: 28px;
  height: 28px;
  margin-left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.15s;
}

.reaction-picker-expand:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Развёрнутая панель — сетка эмодзи */
.reaction-picker--expanded .reaction-picker-full {
  display: flex;
  flex-direction: column;
  min-width: 280px;
  max-width: 320px;
  max-height: 280px;
}

.reaction-picker-full-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.reaction-picker-emoji--full {
  width: 34px;
  height: 34px;
  font-size: 24px;
}

.reaction-picker-collapse {
  margin-top: 4px;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.reaction-picker-collapse:hover {
  background: rgba(255, 255, 255, 0.15);
}
/* Цитата при ответе (как в Telegram) */
.message-reply-quote {
  padding: 6px 10px;
  margin-bottom: 6px;
  border-left: 3px solid rgba(99, 102, 241, 0.6);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.message-bubble.own .message-reply-quote {
  border-left-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}
.message-reply-quote-author {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
}
.message-bubble.own .message-reply-quote-author {
  color: rgba(255, 255, 255, 0.9);
}
.message-reply-quote-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.3;
}
.message-bubble.other .message-reply-quote-text {
  color: var(--y-text-secondary);
}

/* Свайп влево для быстрого ответа (без иконки — достаточно перетаскивания пузыря) */
.message-bubble-swipe-track {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: flex-end;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
}
.message-bubble-swipe-track.own {
  align-self: flex-end;
  width: 100%;
  justify-content: flex-end;
  overflow: visible; /* хвостик справа не обрезать, как у сообщений слева */
}
/* overflow: visible — чтобы хвостик (::after слева) у пузырей собеседника не обрезался */
/* Трек занимает до 70% строки; пузырь — по ширине контента (без лишних переносов), но не шире трека */
.message-bubble-swipe-track.other {
  align-self: flex-start;
  overflow: visible;
  width: 70%;
  max-width: 70%;
}
.message-bubble-swipe-track.other .message-bubble {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
}
.message-bubble-swipe-track .message-bubble {
  position: relative;
  flex-shrink: 0;
  transition: transform 0.1s ease-out;
}

/* Пузыри сообщений — стандарты Юстихаб. Текст сообщения разрешаем выделять для копирования (инцидент bbd18b21) */
.message-bubble {
  position: relative;
  display: flex;
  margin: 4px 12px;
  max-width: 70%;
  word-wrap: break-word;
  align-self: flex-end;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
}
/* Область текста/контента сообщения — выделение и копирование разрешены */
.message-bubble .message-content-wrapper {
  -moz-user-select: text;
       user-select: text;
  -webkit-user-select: text;
}
/* Невидимая зона наведения рядом с кнопкой лайка, чтобы при движении к кнопке не терять :hover */
.message-bubble::before {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 30px;
  height: 22px;
  pointer-events: auto;
}
.message-bubble.own::before {
  left: -30px;
  right: auto;
}
.message-bubble.other::before {
  left: auto;
  right: -30px;
}

.message-bubble.own .message-content-wrapper {
  background: var(--chat-bubble-own);
  color: #fff;
}
.message-bubble.own {
  direction: ltr; /* хвост всегда справа, не переворачивать в RTL */
}

/* Свои сообщения справа: по левой стороне — полное скругление; по правой — половинное между пузырями; правый нижний без скругления только у последнего в группе (хвост) */
.message-bubble.own:not(.last-in-group) .message-content-wrapper {
  border-bottom-right-radius: calc(var(--y-radius-lg) / 2); /* как правый верхний у последнего — стык между пузырями */
}
.message-bubble.own.last-in-group .message-content-wrapper {
  border-bottom-right-radius: 0; /* под хвост */
  border-top-left-radius: var(--y-radius-lg);
  border-bottom-left-radius: var(--y-radius-lg);
  border-top-right-radius: calc(var(--y-radius-lg) / 2);
}
.message-bubble.own.first-in-group .message-content-wrapper {
  border-top-left-radius: var(--y-radius-lg);
  border-bottom-left-radius: var(--y-radius-lg);
  border-top-right-radius: var(--y-radius-lg);
}
.message-bubble.own.middle-in-group .message-content-wrapper {
  border-top-left-radius: var(--y-radius-lg);
  border-bottom-left-radius: var(--y-radius-lg);
  border-top-right-radius: calc(var(--y-radius-lg) / 2);
}
/* Одиночное сообщение (first+last) — верхний правый с полным скруглением */
.message-bubble.own.first-in-group.last-in-group .message-content-wrapper {
  border-top-right-radius: var(--y-radius-lg);
}

/* Хвост своих сообщений — только у последнего пузыря в группе (справа внизу), как у собеседника — только у последнего */
.message-bubble.own.last-in-group .message-content-wrapper::after {
  content: '';
  position: absolute;
  left: auto;
  right: -6px;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent var(--chat-bubble-own) transparent transparent;
  z-index: 1;
  transform: scaleY(-1) scaleX(-1);
}

/* Цвет сообщений собеседника — через переменную для смены темы */
.message-bubble.other .message-content-wrapper {
  background: var(--chat-bubble-other);
  color: var(--y-text-primary);
}

/* Собеседник: по левой стороне (аватарка) большое скругление только у первого и последнего, между ними — маленькое */
.message-bubble.other.first-in-group .message-content-wrapper,
.message-bubble.other.middle-in-group .message-content-wrapper {
  border-bottom-left-radius: calc(var(--y-radius-lg) / 2);
}
.message-bubble.other.middle-in-group .message-content-wrapper {
  border-top-left-radius: calc(var(--y-radius-lg) / 2);
}
.message-bubble.other.last-in-group .message-content-wrapper {
  border-bottom-left-radius: 0;
}
.message-bubble.other.last-in-group:not(.first-in-group) .message-content-wrapper {
  border-top-left-radius: calc(var(--y-radius-lg) / 2);
}

/* Хвост пузыря — цвет как у блока сообщения */
.message-bubble.other.last-in-group .message-content-wrapper::after {
  content: '';
  position: absolute;
  left: -6px;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 8px 8px;
  border-color: transparent transparent var(--chat-bubble-other) transparent;
  z-index: 1;
}

.message-content-wrapper {
  padding: 10px 14px;
  border-radius: var(--y-radius-lg);
  position: relative;
  transition: opacity 0.2s;
  overflow: visible; /* хвостики ::after выходят за пределы */
}

/* Кликабельные ссылки в тексте сообщений */
.message-content-link {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}
.message-content-link:hover {
  opacity: 0.9;
}
.message-bubble.own .message-content-link {
  color: rgba(255, 255, 255, 0.95);
}
.message-bubble.other .message-content-link {
  color: var(--y-text-primary, #1a1a1a);
}
/* Базовое скругление: для чужих — убираем левый нижний угол (там хвост слева) */
.message-bubble.other .message-content-wrapper {
  border-bottom-left-radius: 0;
}

.message-bubble.optimistic .message-content-wrapper {
  opacity: 0.75;
}

.message-edited {
  font-size: 11px;
  font-style: italic;
  color: var(--y-text-tertiary);
  opacity: 0.8;
}
.message-bubble.own .message-edited {
  color: rgba(255, 255, 255, 0.7);
  opacity: 0.85;
}

/* Голосовое: макс. ширина как у обычного сообщения (трек 70%); для длинных записей не на весь экран — пузырь ограничен треком */
.message-voice-audio {
  margin-bottom: 6px;
  width: 100%;
  min-width: 330px; /* по умолчанию ~1.5× от базового размера */
  max-width: 100%;
}
/* Пузырь с голосовым занимает всю ширину трека (70% экрана), чтобы ширина была примерно 70% */
.message-bubble-swipe-track.other:has(.message-voice-audio) .message-bubble {
  width: 100%;
  max-width: 100%;
}
@media (max-width: 768px) {
  .message-voice-audio {
    min-width: 0;
    max-width: 100%;
  }
}
.message-voice-audio .audio-player--compact {
  max-width: 100%;
  min-width: 0;
}
.message-voice-audio .audio-player--compact .audio-player-waveform {
  min-width: 120px;
}

.message-voice-audio--fallback {
  display: flex;
  align-items: center;
  min-height: 36px;
}
.message-voice-fallback-label {
  font-size: 14px;
  color: var(--message-text-color, rgba(255, 255, 255, 0.85));
  opacity: 0.9;
}

.message-content {
  font-size: 16px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Лайк: кнопка всегда в DOM, скрыта по умолчанию; показ по :hover на пузыре (пузырь = контент + кнопка) */
.message-like-button {
  position: absolute;
  bottom: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--y-bg-elevated, rgba(0, 0, 0, 0.06));
  color: var(--y-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  z-index: 1;
}
.message-bubble:hover .message-like-button {
  display: inline-flex;
}
/* Свои сообщения (пузырь справа) — кнопка слева внизу; иконка всегда залитая, по умолчанию тёмная (неактивная) */
.message-bubble.own .message-like-button {
  left: -15px;
  right: auto;
  background: #242424;
  color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.message-bubble.own .message-like-button.message-like-button-active {
  color: #ffffffe6;
}
/* Чужие сообщения (пузырь слева) — кнопка справа внизу, полностью за правым краем пузыря */
.message-bubble.other .message-like-button {
  left: auto;
  right: -26px; /* 22px кнопка + 4px зазор */
}
.message-like-button:hover {
  background: var(--y-bg-elevated, rgba(0, 0, 0, 0.1));
  color: var(--y-accent, #e24c4c);
}
.message-like-button.message-like-button-active {
  color: #e24c4c;
}
.message-bubble.own .message-like-button:hover {
  color: #ffffffe6;
}
.message-bubble.own .message-like-button:hover.message-like-button-active {
  color: #ffb3b3;
}

/* Кнопка «Добавить реакцию» (при наведении на пузырь); видимость через state */
.message-reaction-trigger {
  position: absolute;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--y-bg-elevated, rgba(0, 0, 0, 0.06));
  color: var(--y-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  z-index: 1;
}
/* Свои сообщения — фон чуть темнее пузыря; чуть опускаем по низу хвоста */
.message-bubble.own .message-reaction-trigger {
  left: -18px;
  right: auto;
  bottom: -2px; /* низ иконки вровень с визуальным низом пузыря */
  background: color-mix(in srgb, var(--chat-bubble-own) 85%, #000);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
/* Сообщения собеседника — фон чуть темнее пузыря, иконка правее (меньше наложения) */
.message-bubble.other .message-reaction-trigger {
  left: auto;
  right: -22px; /* правее — меньше накладывается на пузырь */
  background: color-mix(in srgb, var(--chat-bubble-other) 92%, #000);
  color: var(--y-text-secondary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.message-reaction-trigger:hover {
  background: var(--y-bg-elevated, rgba(0, 0, 0, 0.12));
  color: var(--y-accent, #6366f1);
}
.message-bubble.own .message-reaction-trigger:hover {
  background: color-mix(in srgb, var(--chat-bubble-own) 90%, #000);
  color: #fff;
}
.message-bubble.other .message-reaction-trigger:hover {
  background: color-mix(in srgb, var(--chat-bubble-other) 88%, #000);
  color: var(--y-text-secondary);
}

/* Пилюли реакций в одной строке с временем (внутри .message-footer); выровнены по левой стороне */
.message-reactions-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-right: auto;
}
.message-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 6px;
  border-radius: 18px;
  border: none;
  background: color-mix(in srgb, var(--chat-bubble-other) 75%, #000);
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s;
  box-sizing: border-box;
}
.message-bubble.own .message-reaction-pill {
  background: color-mix(in srgb, var(--chat-bubble-own) 78%, #000);
}
.message-reaction-pill:hover {
  background: color-mix(in srgb, var(--chat-bubble-other) 65%, #000);
}
.message-bubble.own .message-reaction-pill:hover {
  background: color-mix(in srgb, var(--chat-bubble-own) 70%, #000);
}
.message-reaction-pill--own {
  background: color-mix(in srgb, var(--chat-bubble-own) 85%, rgba(99, 102, 241, 0.4));
}
.message-bubble.other .message-reaction-pill--own {
  background: color-mix(in srgb, var(--chat-bubble-other) 75%, rgba(99, 102, 241, 0.35));
}
.message-reaction-pill-emoji {
  font-size: 16px;
  line-height: 1;
}
.message-reaction-pill-count {
  font-size: 12px;
  opacity: 0.9;
}
.message-reaction-pill-avatars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
}
.message-reaction-pill .message-like-reaction-avatar {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--y-accent) 0%, #a855f7 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.message-reaction-pill .message-like-reaction-avatar-initials {
  font-size: 7px;
  font-weight: 600;
  color: #fff;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Подсветка при прокрутке к сообщению с непрочитанной реакцией: пузырь темнеет и возвращается в норму, реакции — «та-да» появление */
.message-bubble--highlight-reaction .message-content-wrapper {
  animation: bubble-highlight 2.5s ease-out;
}
@keyframes bubble-highlight {
  0% {
    filter: brightness(1);
    box-shadow: none;
  }
  8% {
    filter: brightness(0.82);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
  }
  25% {
    filter: brightness(0.9);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
  }
  100% {
    filter: brightness(1);
    box-shadow: none;
  }
}
.message-bubble--highlight-reaction.own .message-content-wrapper {
  animation-name: bubble-highlight-own;
}
@keyframes bubble-highlight-own {
  0% {
    filter: brightness(1);
    box-shadow: none;
  }
  8% {
    filter: brightness(0.78);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
  }
  25% {
    filter: brightness(0.88);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  }
  100% {
    filter: brightness(1);
    box-shadow: none;
  }
}

.message-reactions-pills--highlight .message-reaction-pill {
  animation: reaction-tada 2.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s forwards;
  opacity: 0;
}
@keyframes reaction-tada {
  0% {
    transform: scale(0.35);
    opacity: 0;
    box-shadow: none;
  }
  14% {
    transform: scale(1.45);
    opacity: 1;
    box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.5), 0 0 0 2px rgba(99, 102, 241, 0.4);
  }
  28% {
    transform: scale(1.08);
    opacity: 1;
    box-shadow: 0 0 12px 2px rgba(99, 102, 241, 0.25);
  }
  45% {
    transform: scale(1.02);
    opacity: 1;
    box-shadow: 0 0 6px 1px rgba(99, 102, 241, 0.12);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: none;
  }
}
.message-bubble.own .message-reactions-pills--highlight .message-reaction-pill {
  animation-name: reaction-tada-own;
}
@keyframes reaction-tada-own {
  0% {
    transform: scale(0.35);
    opacity: 0;
    box-shadow: none;
  }
  14% {
    transform: scale(1.45);
    opacity: 1;
    box-shadow: 0 0 20px 4px rgba(255, 255, 255, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.3);
  }
  28% {
    transform: scale(1.08);
    opacity: 1;
    box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.2);
  }
  45% {
    transform: scale(1.02);
    opacity: 1;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: none;
  }
}

/* Блок под текстом: заполненное сердечко + маленькая аватарка того, кто лайкнул */
.message-like-reactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.message-like-reaction-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.message-like-icon-filled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e24c4c;
}
.message-bubble.own .message-like-icon-filled {
  color: #ff8a80;
}
.message-like-reaction-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--y-bg-elevated, rgba(0, 0, 0, 0.08));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.message-like-reaction-avatar-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
.message-like-reaction-avatar-initials {
  font-size: 9px;
  font-weight: 600;
  color: var(--y-text-secondary);
  line-height: 1;
}
.message-bubble.own .message-like-reaction-avatar-initials {
  color: rgba(255, 255, 255, 0.9);
}

/* В сообщении с файлом — отступ текста снизу, чтобы был зазор между текстом и блоком файла */
.message-content-wrapper:has(.message-attachments) .message-content {
  margin-bottom: 8px;
}
.message-time {
  font-size: 11px;
  color: var(--y-text-muted);
}
.message-bubble.own .message-time {
  color: rgba(255, 255, 255, 0.5);
}
.message-footer-error {
  font-size: 12px;
  color: var(--y-error);
}
.message-bubble.own .message-footer-error {
  color: #ff8a80;
}
.message-status-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.85);
}
.message-status-icon.delivered {
  color: var(--message-status-delivered);
}
.message-status-icon.read {
  color: var(--message-status-read);
}

.message-bubble.deleted .message-content-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
  padding: 8px 12px;
}
.message-bubble.deleted .message-content-wrapper::after {
  display: none; /* скрыть хвост для пустого пузыря */
}
.message-tombstone {
  font-style: italic;
  color: var(--y-text-tertiary);
  font-size: 14px;
}

.message-system {
  text-align: center;
  margin: 8px 12px;
}
.message-system .message-content {
  display: inline-block;
  background: var(--y-bg-card);
  border: 1px solid var(--y-border);
  padding: 6px 12px;
  border-radius: var(--y-radius-md);
  font-size: 13px;
  color: var(--y-text-tertiary);
}

.message-bubble-call-widget {
  flex-direction: column;
  align-items: flex-start;
}
.message-bubble-call-widget.own {
  align-items: flex-end;
}
.message-bubble-call-widget.other {
  align-items: flex-start;
}
.message-call-widget-time {
  margin-top: 8px;
}
.message-call-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: var(--y-bg-card);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  max-width: 280px;
}
.message-call-widget-text {
  font-size: 14px;
  color: var(--y-text-primary);
}
.message-call-widget-button {
  display: inline-block;
  padding: 8px 14px;
  background: var(--y-accent, #3b82f6);
  color: #fff;
  border-radius: var(--y-radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.message-call-widget-button:hover {
  opacity: 0.9;
}
.message-call-widget-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 15px;
  min-width: 270px;
  margin-top: 10px;
  background: var(--y-bg-card);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  max-width: 300px;
}
.message-call-widget-room {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.message-call-widget-label {
  font-size: 12px;
  color: var(--y-text-secondary);
}
.message-call-widget-room-code {
  font-size: 16px;
  font-weight: 600;
  color: var(--y-text-primary);
  letter-spacing: 0.02em;
}
.message-call-widget-participants {
  font-size: 13px;
  color: var(--y-text-secondary);
}
.message-call-widget-ended {
  font-size: 13px;
  color: var(--y-text-secondary);
}
.message-call-widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.message-call-widget-button-end {
  background: #dc2626;
  color: #fff;
  border: none;
}
.message-call-widget-button-end:hover {
  background: #b91c1c;
  opacity: 1;
}
/* Оверлей в портале в document.body — полупрозрачное затемнение, поверх всего (включая iframe) */
.message-call-end-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;
  isolation: isolate;
}
.message-call-end-confirm {
  background: #1c1c1c;
  border-radius: var(--y-radius-md);
  padding: 20px 24px;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.message-call-end-confirm-text {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--y-text-primary, #e5e5e5);
}
.message-call-end-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.message-call-end-confirm-primary {
  background: #dc2626 !important;
  color: #fff !important;
  border: none !important;
}
.message-call-end-confirm-primary:hover {
  background: #b91c1c !important;
}
.message-call-end-confirm-cancel {
  background: var(--y-bg-secondary, #2a2a2a) !important;
  color: var(--y-text-primary, #e5e5e5) !important;
  border: 1px solid var(--y-border, #404040) !important;
}
.message-call-end-confirm-cancel:hover {
  background: var(--y-bg-tertiary, #363636) !important;
}

.message-actions {
  display: flex;
  gap: var(--y-space-xs);
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.message-bubble:hover .message-actions {
  opacity: 1;
}
.message-action-button {
  background: none;
  border: none;
  color: var(--y-accent);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  font-family: inherit;
}
.message-action-button:hover {
  text-decoration: underline;
}

.message-edit-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--y-border-active);
  border-radius: var(--y-radius-md);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  min-height: 60px;
  background: var(--y-bg-input);
  color: var(--y-text-primary);
}
.message-edit-input:focus {
  border-color: var(--y-border-focus);
}
.message-edit-actions {
  display: flex;
  gap: var(--y-space-xs);
  margin-top: var(--y-space-xs);
}
.message-edit-save,
.message-edit-cancel {
  padding: 8px 14px;
  border: none;
  border-radius: var(--y-radius-md);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.message-edit-save {
  background: var(--y-accent);
  color: #fff;
}
.message-edit-save:hover {
  background: var(--y-accent-hover);
}
.message-edit-cancel {
  background: var(--y-bg-card);
  color: var(--y-text-primary);
  border: 1px solid var(--y-border);
}
.message-edit-cancel:hover {
  background: var(--y-bg-card-hover);
}

/* Реакции */
.message-reactions-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: 4px;
}
.reaction-pill-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--y-border);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}
.reaction-pill-inline:hover {
  background: rgba(255, 255, 255, 0.15);
}
.message-bubble.own .reaction-pill-inline {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}
.reaction-count {
  font-size: 11px;
  opacity: 0.9;
}

/* Пикер реакций рендерится в Portal (document.body), не в DOM сообщения — не влияет на высоту блока */
.message-reactions-picker-popup,
.message-reactions-picker-popup-portal {
  /* position, left, top, z-index задаются инлайном у портала; отступ от пузыря — в top (GAP) */
}
.message-reactions-picker-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: var(--y-bg-tertiary);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  padding: 6px 8px;
  box-shadow: var(--y-shadow-modal);
}
.message-reactions-picker {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.reaction-button {
  background: var(--y-bg-card);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  padding: 4px 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.reaction-button:hover {
  background: var(--y-bg-card-hover);
}
.reaction-button.active {
  background: rgba(0, 113, 227, 0.2);
  border-color: var(--y-accent);
}

/* Вложения: иконка слева в круге, справа название и под ним размер. Без фона у блока файла. */
.message-attachments {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.message-bubble.own .attachment-item {
  background: none !important;
}
.attachment-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(91, 155, 213, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* Свои сообщения: голубой круг и белая иконка (как в примере) */
.message-bubble.own .attachment-icon-wrap {
  background: rgba(91, 155, 213, 0.9);
  color: #fff;
}
.attachment-icon-wrap .attachment-icon {
  width: 26px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  margin-left: 4px;
}
/* Загнутый уголок документа — голубоватая заливка в тон синей подложки иконки (тот же цвет, чуть темнее); без обводки */
.attachment-icon-wrap .attachment-icon .attachment-icon-fold {
  fill: rgba(91, 155, 213, 0.5);
  stroke: none;
}
/* Сообщения собеседника: голубой круг — белая иконка */
.message-bubble.other .attachment-icon-wrap {
  color: #fff;
}
/* Блок с названием файла и размером — макс. 300px, чтобы длинные имена не раздували пузырь */
.attachment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 300px;
  overflow: hidden;
}
.attachment-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-size {
  font-size: 12px;
  color: var(--y-text-tertiary);
}
.message-bubble.own .attachment-size {
  color: rgba(255, 255, 255, 0.7);
}
/* Ссылка на файл — весь блок (иконка + название + размер); без подчёркивания, только pointer */
.attachment-item.attachment-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
}
.attachment-item.attachment-link:hover .attachment-name {
  text-decoration: none;
}
.attachment-item.attachment-placeholder .attachment-name {
  font-weight: 400;
  color: var(--y-text-secondary);
}
.message-bubble.own .attachment-item.attachment-placeholder .attachment-name {
  color: rgba(255, 255, 255, 0.8);
}
.attachment-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: attachment-spin 0.7s linear infinite;
}
.message-bubble.own .attachment-spinner {
  border-color: rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
}
@keyframes attachment-spin {
  to {
    transform: rotate(360deg);
  }
}
.attachment-status-pending {
  font-size: 12px;
  color: var(--y-text-tertiary);
  font-style: italic;
}
.message-bubble.own .attachment-status-pending {
  color: rgba(255, 255, 255, 0.7);
}
.attachment-status-clean {
  font-size: 12px;
  color: var(--y-text-tertiary);
}
.message-bubble.own .attachment-status-clean {
  color: rgba(255, 255, 255, 0.7);
}
/* Зелёный бейдж с галочкой для проверенных файлов */
.attachment-check-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5ca50f;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  border: none;
}
.attachment-loading,
.attachment-error {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--y-text-tertiary);
  font-style: italic;
}
.attachment-error {
  background: transparent;
  color: var(--y-error);
}
.message-bubble.own .attachment-error {
  color: #ff8a80;
}

@container chat-area (max-width: 799px) {
  .message-bubble.own.last-in-group .message-content-wrapper::after {
    left: auto;
    right: -6px;
    bottom: 0;
    border-width: 0 8px 8px 0;
    border-color: transparent var(--chat-bubble-own) transparent transparent;
    transform: scaleY(-1) scaleX(-1);
  }
}

/* Небольшое уменьшение пузыря перед открытием модалки (долгое нажатие) */
.message-bubble--shrinking {
  animation: message-bubble-shrink 0.18s ease-out forwards;
}

@keyframes message-bubble-shrink {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.94);
  }
}

/* Модальный режим контекстного меню (мобильный, в стиле Telegram) */
.message-context-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #000;
  animation: message-context-modal-overlay-enter 0.2s ease-out forwards;
}

.message-context-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: message-context-modal-content-enter 0.25s ease-out forwards;
}

.message-context-modal-bubble {
  margin: 0;
  width: auto;
  max-width: 100%;
  align-self: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.message-context-modal-bubble .message-content-wrapper {
  max-width: 100%;
}

@keyframes message-context-modal-overlay-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes message-context-modal-content-enter {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Поле ввода сообщений — стандарты Юстихаб */
.message-input-container {
  flex-shrink: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.85));
  padding: 0 var(--y-space-md) 10px;
  margin-top: 0; /* отступ задаётся в ChatPage через paddingBottom списка сообщений */
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 20;
}
/* Панель ответа над полем ввода (как в Telegram), непрозрачный фон */
.message-input-reply-bar {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 8px;
  padding: 8px 12px;
  background: #252529;
  border-left: 3px solid #6366f1;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.message-input-reply-preview {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.message-input-reply-author {
  font-size: 13px;
  font-weight: 600;
  color: #6366f1;
}
.message-input-reply-text {
  font-size: 13px;
  color: rgb(156, 163, 175);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-input-reply-cancel {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: rgb(156, 163, 175);
  display: flex;
  align-items: center;
  justify-content: center;
}
.message-input-reply-cancel:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.message-input-inner-wrapper {
  width: 100%;
  max-width: 810px;
}

.message-input-pending {
  display: flex;
  flex-wrap: wrap;
  gap: var(--y-space-xs);
  margin-bottom: var(--y-space-xs);
}
.pending-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--y-bg-card);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  font-size: 13px;
  color: var(--y-text-secondary);
}
.pending-attachment.uploading {
  background: rgba(0, 113, 227, 0.1);
  border-color: rgba(0, 113, 227, 0.3);
}
.pending-attachment.done {
  background: var(--y-success-bg);
  border-color: rgba(52, 168, 83, 0.3);
}
.pending-attachment.error {
  background: var(--y-error-bg);
  border-color: rgba(234, 67, 53, 0.3);
  color: var(--y-error);
}
.pending-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pending-status {
  font-size: 12px;
  color: var(--y-text-tertiary);
}
.pending-attachment.error .pending-status {
  color: var(--y-error);
}
.pending-remove {
  padding: 0 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--y-text-tertiary);
}
.pending-remove:hover {
  color: var(--y-error);
}

.message-input-file-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}


.message-input-wrapper {
  position: relative;
  z-index: 1; /* выше фона контейнера (градиента), чтобы тень не перекрывалась */
  background: #18191a;
  border: 1px solid #2a2b2c;
  border-radius: 24px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Тень вверх + тонкая светлая обводка сверху, чтобы было видно на тёмном фоне до первого клика */
  box-shadow:
    0 -12px 20px #0000008f,
    0 -4px 10px #00000052,
    0 -1px 0 rgba(255, 255, 255, 0.06);
}
.message-input-wrapper:focus-within {
  outline: none;
  box-shadow:
    0 -12px 20px #0000008f,
    0 -4px 10px #00000052,
    0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.message-input-field-wrapper {
  flex: 1;
  min-height: 24px;
}

.message-input {
  width: 100%;
  resize: none;
  border: none;
  background: transparent;
  padding: 5px 10px;
  font-size: 17px;
  line-height: 1.4;
  color: rgb(243, 244, 246);
  outline: none;
  min-height: 20px;
  max-height: 200px;
}
.message-input::-moz-placeholder {
  color: rgb(107, 114, 128);
}
.message-input::placeholder {
  color: rgb(107, 114, 128);
}
.message-input:focus,
.message-input:focus-visible {
  outline: none;
  box-shadow: none;
}
.message-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.message-input-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
}

.message-input-bottom-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-input-mode-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: rgb(156, 163, 175);
  font-size: 14px;
  transition: background-color 0.15s, color 0.15s;
}
.message-input-mode-selector:hover {
  background: transparent;
  color: #fff;
}
.message-input-mode-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.message-input-mode-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.message-input-bottom-right {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: visible;
}

.message-input-char-count {
  font-size: 12px;
  color: rgb(107, 114, 128);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  padding: 0 5px;
}

.message-send-button {
  display: flex;
  height: 40px;
  min-height: 44px;
  width: 40px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.15s;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1 0%, #c084fc 100%);
  color: #fff;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.message-send-button:not(:disabled):hover {
  opacity: 0.9;
}
.message-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.message-send-button svg {
  height: 20px;
  width: 20px;
}

/* Кнопка микрофона (мобильная: когда поле ввода не в фокусе). Отключаем лупу при долгом нажатии в Safari/Chrome */
.message-mic-button {
  display: flex;
  height: 40px;
  width: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.15s, transform 0.2s ease;
  transform-origin: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1 0%, #c084fc 100%);
  color: #fff;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
       user-select: none;
}
/* Увеличение только в режиме записи (см. .message-mic-button--recording), не при первом нажатии */
.message-mic-button:not(:disabled):active {
  opacity: 0.9;
}
.message-mic-button:not(:disabled):hover {
  opacity: 0.9;
}
.message-mic-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.message-mic-button svg {
  height: 20px;
  width: 20px;
}

/* Модальное окно «Отправить файл» — единый цвет, без границ, оверлей без размытия */
.send-file-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.send-file-modal {
  background-color: var(--chat-list-page-bg);
  border-radius: var(--y-radius-lg, 12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  isolation: isolate;
}

.send-file-modal-title {
  margin: 0;
  padding: var(--y-space-md) var(--y-space-lg);
  font-size: 18px;
  font-weight: 600;
  color: #e8e8e8;
  background-color: var(--chat-list-page-bg);
}

.send-file-modal-list {
  padding: var(--y-space-sm) var(--y-space-lg);
  overflow-y: auto;
  flex: 0 0 auto;
  background-color: var(--chat-list-page-bg);
}

.send-file-modal-item {
  display: flex;
  align-items: center;
  gap: var(--y-space-sm);
  padding: var(--y-space-sm) 0;
  background-color: var(--chat-list-page-bg);
}

.send-file-modal-item-error .send-file-modal-item-size,
.send-file-modal-item-size-error {
  color: var(--y-error) !important;
  font-weight: 500;
}

/* Иконка файла в модалке — как в чате: круг + документ с загнутым уголком */
.send-file-modal-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(91, 155, 213, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.send-file-modal-icon-wrap .send-file-modal-icon {
  width: 26px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  margin-left: 4px;
}
.send-file-modal-icon-wrap .send-file-modal-icon .send-file-modal-icon-fold {
  fill: rgba(91, 155, 213, 0.5);
  stroke: none;
}

.send-file-modal-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.send-file-modal-item-name {
  font-size: 14px;
  color: #e8e8e8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-file-modal-item-size {
  font-size: 12px;
  color: #a0a0a0;
}

.send-file-modal-remove {
  flex-shrink: 0;
  align-self: flex-start;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--y-radius-round);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--y-text-tertiary);
}
.send-file-modal-remove:hover {
  color: var(--y-error);
}

.send-file-modal-message {
  padding: var(--y-space-sm) var(--y-space-lg);
  background-color: var(--chat-list-page-bg);
}

.send-file-modal-input {
  width: 100%;
  padding: var(--y-space-sm) var(--y-space-md);
  border: none;
  border-radius: var(--y-radius-md);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  background-color: var(--y-bg-input);
  color: #e8e8e8;
  box-sizing: border-box;
}
.send-file-modal-input::-moz-placeholder {
  color: #808080;
}
.send-file-modal-input::placeholder {
  color: #808080;
}
.send-file-modal-input:focus {
  outline: none;
}

.send-file-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--y-space-md);
  padding: var(--y-space-md) var(--y-space-lg);
  background-color: var(--chat-list-page-bg);
}

.send-file-modal-btn-add {
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}
.send-file-modal-btn-add:hover:not(:disabled) {
  opacity: 0.9;
}
.send-file-modal-btn-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-file-modal-footer-right {
  display: flex;
  gap: var(--y-space-xl, 24px);
}

.send-file-modal-btn-cancel,
.send-file-modal-btn-send {
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  color: #fff;
}
.send-file-modal-btn-cancel {
  color: rgba(255, 255, 255, 0.65);
}
.send-file-modal-btn-cancel:hover:not(:disabled),
.send-file-modal-btn-send:hover:not(:disabled) {
  opacity: 0.9;
}
.send-file-modal-btn-cancel:disabled,
.send-file-modal-btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Мобильная версия: одна строка как в Telegram — иконка файла, поле «Сообщение», отправка; без счётчика символов */
@media (max-width: 768px) {
  .message-input-wrapper--mobile {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 2px;
    padding: 6px 8px 6px 6px;
    min-height: 48px;
  }
  /* Одна линия: у всех трёх блоков высота 36px в свернутом виде, выравнивание по низу */
  .message-input-wrapper--mobile .message-input-field-wrapper {
    order: 2;
    flex: 1;
    min-width: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
  }
  .message-input-wrapper--mobile .message-input-bottom-bar {
    display: contents;
  }
  .message-input-wrapper--mobile .message-input-bottom-left {
    order: 1;
    margin: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
  }
  .message-input-wrapper--mobile .message-input-bottom-right {
    order: 3;
    gap: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
  }
  .message-input-wrapper--mobile .message-input-char-count {
    display: none;
  }
  .message-input-wrapper--mobile .message-input-mode-selector {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    gap: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  .message-input-wrapper--mobile .message-input-mode-selector-label {
    display: none;
  }
  .message-input-wrapper--mobile .message-input {
    width: 100%;
    padding: 6px 8px;
    min-height: 24px;
    max-height: 120px;
    font-size: 16px;
    line-height: 1.35;
    box-sizing: border-box;
  }
  .message-input-wrapper--mobile .message-send-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex-shrink: 0;
  }
  .message-input-wrapper--mobile .message-send-button svg {
    height: 18px;
    width: 18px;
  }
  .message-input-wrapper--mobile .message-mic-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex-shrink: 0;
  }
  .message-input-wrapper--mobile .message-mic-button svg {
    height: 18px;
    width: 18px;
  }
  .message-input-wrapper--mobile .message-input-voice-preview-delete {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  .message-input-wrapper--mobile .message-input-voice-preview-send-wrap {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
  }
  .message-input-wrapper--mobile .message-input-voice-preview .message-send-button--scale {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    transform: scale(2);
  }
  .message-input-wrapper--mobile .message-input-voice-preview .message-send-button--scale svg {
    height: 20px;
    width: 20px;
  }
  .message-input-wrapper--mobile .message-input-voice-preview .audio-player--compact .audio-player-play-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
}

/* Ряд над полем ввода: контейнер для замочка. Контейнер прижат к низу (fixed), поэтому
   padding-top не двигает замочек — он остаётся внизу строки. Позиционируем зону замочка
   абсолютно в верхней части строки (top: 0), тогда замочек реально оказывается выше.
   z-index выше, чем у .message-input-wrapper (1), чтобы кнопка «Стоп» не перекрывалась и получала нажатия. */
.message-input-voice-lock-row {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 4px;
  min-height: 44px;
  /* Высота «полки» над полем ввода: замочек будет вверху этой полки (см. .message-input-voice-lock-zone top). Ниже = меньше значение. */
  padding-top: 80px;
}
/* В режиме блокировки: отступ задаётся инлайном (lockRowPaddingPx) для синхронной анимации с возвратом кнопки. Fallback — только немного меньше 80px. */
.message-input-voice-lock-row--locked {
  padding-top: 56px;
  transition: padding-top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.message-input-voice-lock-spacer {
  flex: 1;
  min-width: 0;
}
/* Зона блокировки: иконка замка + шеврон вверх (подсказка «тяните вверх»). Растянута по вертикали, не увеличена. Позиция — верх строки (top: 0), справа. Отступ right выравнивает центр замочка с центром кнопки микрофона (у voice-wrapper padding-right: 8px, слот 40px → центр на 28px от края; замочек 44px → right: 6px даёт центр 28px). */
.message-input-voice-lock-zone {
  position: absolute;
  top: 0;
  right: 6px;
  width: 44px;
  height: 64px;
  min-width: 44px;
  min-height: 64px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 39, 42, 0.95);
  border: 1px solid #3f3f46;
  border-radius: 22px;
  color: rgb(156, 163, 175);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  pointer-events: none;
}
.message-input-voice-lock-zone--hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
}
.message-input-voice-lock-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.message-input-voice-lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}
.message-input-voice-lock-icon svg {
  display: block;
}
/* Анимация шеврона: лёгкое движение вверх-вниз (подсказка «тяните вверх») */
@keyframes message-input-voice-lock-chevron-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.message-input-voice-lock-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  margin-top: -1px;
  animation: message-input-voice-lock-chevron-bounce 1.2s ease-in-out infinite;
}
.message-input-voice-lock-chevron svg {
  display: block;
  opacity: 0.85;
}

/* Режим «удерживайте микрофон»: слева таймер, волна на всю ширину, справа кнопка микрофона (только мобильная).
   z-index выше ряда блокировки (10), чтобы кнопка «Отправить» и кнопка микрофона были поверх замочка. */
.message-input-wrapper--voice {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 48px; /* фиксированная высота — увеличенная кнопка не должна растягивать контейнер */
  min-height: 48px;
  max-height: 48px;
  padding: 6px 8px 6px 6px;
  gap: 14px; /* отступ между блоком «волна + Отмена» и кнопкой микрофона */
  position: relative;
  z-index: 11;
  overflow: visible;
}

.message-input-voice-view {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px; /* отступ между таймером и анимацией волны */
  position: relative;
  z-index: 2; /* выше слота с кнопкой (scale 2), чтобы «Отмена» и таймер получали нажатия */
  padding-left: 10px; /* отступ слева от края контейнера для таймера */
}

/* Превью голоса после «Стоп»: плеер + Отправить / Удалить */
.message-input-voice-error {
  font-size: 13px;
  color: #ef4444;
  padding: 6px 0;
}
.message-input-voice-preview {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-left: 0; /* без лишнего отступа слева от края контейнера ввода */
  padding-right: 0; /* без лишнего отступа справа */
  min-height: 0;
}
.message-input-voice-preview .message-input-voice-error {
  flex-basis: 100%;
  width: 100%;
  order: -1;
  padding: 2px 0 4px;
}
.message-input-voice-preview-audio {
  width: 100%;
  max-width: 280px;
  height: 40px;
  border-radius: 8px;
}
/* Плеер занимает только пространство до блока с кнопками; волна не должна заходить на «Удалить»/«Отправить». min-width чтобы flex не дал нулевую ширину до расчёта раскладки — иначе волна не отображается. */
.message-input-voice-preview-player {
  flex: 1;
  min-width: 80px;
  max-width: none;
  min-height: 40px;
  max-height: 40px;
  display: flex;
  align-items: center;
  overflow: visible;
}
.message-input-voice-preview-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
/* Кнопка «Отправить» в превью — как при заблокированной записи: слот 40×40, кнопка 40×40 + scale(2); отступ от кнопки «Удалить», чтобы увеличенная кнопка не перекрывала её */
.message-input-voice-preview-send-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  max-height: 40px;
  margin-left: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}
.message-input-voice-preview .message-send-button--scale {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  transform: scale(2);
  transform-origin: center;
}
.message-input-voice-preview .message-send-button--scale svg {
  height: 20px;
  width: 20px;
}
/* Кнопка удалить — только иконка корзины, компактная, слева от кнопки «Отправить» */
.message-input-voice-preview-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgb(239, 68, 68);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.message-input-voice-preview-delete:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.15);
  color: rgb(220, 38, 38);
}
.message-input-voice-preview-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Таймер в формате времени M:SS.t (0:00.0, 1:10.5 …) */
.message-input-voice-timer {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
  color: rgb(156, 163, 175);
  min-width: 4em;
}

.message-input-voice-preparing {
  margin: 0;
  font-size: 14px;
  color: rgb(156, 163, 175);
}

/* Блок «Идёт подготовка»: спиннер + текст */
.message-input-voice-preparing-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.message-input-voice-preparing-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: message-input-preparing-spin 0.7s linear infinite;
}
@keyframes message-input-preparing-spin {
  to { transform: rotate(360deg); }
}

/* Кнопка микрофона в состоянии «подготовка»: 40×40, только transform: scale(1). Увеличение — только через scale в TSX, от центра. */
.message-mic-button--preparing {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(192, 132, 252, 0.9) 100%);
  color: #fff;
  cursor: wait;
}
.message-mic-button-preparing-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: message-input-preparing-spin 0.6s linear infinite;
}

/* Блок волны + «Отмена»: волна фиксированной ширины, «Отмена» справа от неё */
.message-input-voice-wave-fill {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.message-input-voice-wave-fill--holding {
  gap: 10px;
}
.message-input-voice-wave-fill--holding .message-input-voice-cancel-text {
  margin-right: 0;
}

/* Волна записи — фиксированная ширина (анимированные полоски), не на всю ширину */
.message-input-voice-wave {
  width: 80px;
  max-width: 120px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  height: 28px;
  flex-shrink: 0;
}

/* Полоски волны — фиксированная ширина, анимация по высоте */
.message-input-voice-bar {
  width: 4px;
  min-height: 6px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, #6366f1 0%, #c084fc 100%);
  animation: message-input-voice-bar-pulse 0.6s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

@keyframes message-input-voice-bar-pulse {
  0% {
    transform: scaleY(0.35);
    opacity: 0.8;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Текстовая кнопка «Отмена» в режиме записи: текст + шеврон влево */
.message-input-voice-cancel-text {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin: -8px -12px -8px 0;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: rgb(156, 163, 175);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  touch-action: manipulation;
}
.message-input-voice-cancel-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  animation: message-input-voice-cancel-chevron-bounce 1.2s ease-in-out infinite;
}
.message-input-voice-cancel-chevron svg {
  display: block;
  opacity: 0.85;
}
@keyframes message-input-voice-cancel-chevron-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}
.message-input-voice-cancel-text:hover {
  color: rgb(243, 244, 246);
}
.message-input-voice-cancel-text:active {
  opacity: 0.8;
}
.message-input-voice-cancel-text--hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
  border-radius: 8px;
  padding: 4px 8px;
  margin: -4px -8px -4px 0;
}

/* Фиксированный слот под кнопку микрофона в режиме записи: участвует в flex как 40×40, окно ввода не растёт */
.message-input-voice-mic-slot {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  max-height: 40px;
  flex-shrink: 0;
  align-self: center;
  overflow: visible;
  position: relative;
  z-index: 11; /* выше .message-input-voice-lock-row (10), чтобы кнопка микрофона при перетаскивании была поверх кнопки блокировки */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Обёртка кнопки микрофона в режиме записи: слот 40×40, flex-центрирование — кнопка только transform: scale(), без сдвига */
.message-mic-button-recording-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  max-height: 40px;
  flex-shrink: 0;
  overflow: visible;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Пульсирующие кольца (волны) вокруг кнопки микрофона в режиме записи */
.message-mic-button-waves {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  pointer-events: none;
  z-index: 0;
}
.message-mic-button-pulse-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  animation: message-mic-pulse-ring 1.8s ease-out infinite;
}
.message-mic-button-pulse-ring--2 {
  animation-delay: 0.6s;
}
.message-mic-button-pulse-ring--3 {
  animation-delay: 1.2s;
}
@keyframes message-mic-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Кнопка в режиме записи: 40×40, центр через flex в обёртке; только transform: scale()/translate() в TSX — масштаб от центра. */
.message-input-wrapper--voice .message-mic-button--recording {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: none;
}
/* Плавное перемещение к замочку/отмене во время перетаскивания */
.message-input-wrapper--voice .message-mic-button--recording-dragging {
  transition: transform 0.12s ease-out;
}
.message-input-wrapper--voice .message-mic-button--recording:not(:disabled):active {
  opacity: 0.9;
}
.message-input-wrapper--voice .message-mic-button--recording svg {
  height: 20px;
  width: 20px;
}

/* Кнопка «Отправить» в режиме блокировки: 40×40, центр через flex; только transform: scale(2) в TSX — рост от центра. */
.message-mic-button--send-locked {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  transform-origin: center;
  transition: opacity 0.15s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1 0%, #c084fc 100%);
  color: #fff;
  touch-action: manipulation;
}
.message-mic-button--send-locked:hover {
  opacity: 0.9;
}
.message-mic-button--send-locked:active {
  opacity: 0.85;
}
.message-mic-button--send-locked svg {
  height: 20px;
  width: 20px;
}

/* Зона блокировки в режиме «запись заблокирована»: кнопка «Стоп» (только иконка). Круглая по высоте, не капсула. */
.message-input-voice-lock-zone--stop {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.message-input-voice-lock-zone--stop:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}
.message-input-voice-lock-zone--stop:active {
  opacity: 0.9;
}

/* Полноэкранный оверлей: левая половина = Отмена, правая = Стоп. Без измерения координат — тапы всегда срабатывают. */
.message-input-voice-tap-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
}
.message-input-voice-tap-overlay--fullscreen {
  display: flex;
  flex-direction: row;
  pointer-events: auto;
}
.message-input-voice-tap-zone {
  flex: 1;
  min-width: 0;
  min-height: 120px;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.message-input-voice-tap-zone--cancel {
  /* левая половина = Отмена */
}
.message-input-voice-tap-zone--stop {
  /* правая половина = Стоп */
}
.video-call-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--y-bg-primary, #0d0d0d);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 1000;
  padding: 0;
}

.video-call-modal {
  width: 100%;
  height: 100%;
  background: var(--y-bg-primary, #1a1a1a);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
}

/* Свёрнутый вид: маленькое окно в углу, iframe видим (meet покажет только «я» при < 400px) */
.video-call-modal-overlay-minimized {
  padding: 0;
  align-items: flex-end;
  justify-content: flex-end;
  background: transparent;
  pointer-events: none;
}
.video-call-modal-overlay-minimized .video-call-modal {
  pointer-events: auto;
}
.video-call-modal-minimized {
  width: 320px;
  height: 240px;
  min-width: 280px;
  min-height: 180px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  border-radius: var(--y-radius-md, 8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin: 12px;
  flex: none;
}
.video-call-modal-minimized .video-call-modal-header {
  padding: 6px 10px;
  border-radius: var(--y-radius-md, 8px) var(--y-radius-md, 8px) 0 0;
}
.video-call-modal-header-draggable {
  cursor: move;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
}
.video-call-modal-header-draggable .video-call-modal-expand {
  cursor: pointer;
}
.video-call-modal-minimized .video-call-modal-title {
  font-size: 13px;
}
.video-call-modal-minimized .video-call-modal-body {
  flex: 1;
  min-height: 0;
}
.video-call-modal-expand {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--y-text-primary, #fff);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--y-radius-sm, 6px);
}
.video-call-modal-expand:hover {
  background: rgba(255, 255, 255, 0.18);
}
.video-call-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Верхний заголовок и кнопка закрыть не заходят за верхний бар (safe-area) */
.video-call-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top, 0)) max(20px, env(safe-area-inset-right, 0)) 10px max(20px, env(safe-area-inset-left, 0));
  background: #1c1c1c;
  border-bottom: 0;
}

.video-call-modal-title {
  font-size: 16px;
  font-weight: 400;
  color: #7d7d7d;
}

.video-call-modal-close {
  background: none;
  border: none;
  color: var(--y-text-secondary, #999);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--y-radius-sm, 6px);
}

.video-call-modal-close:hover {
  color: var(--y-text-primary, #fff);
  background: rgba(255, 255, 255, 0.08);
}

.video-call-modal-minimize {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--y-text-primary, #fff);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 16px;
  border-radius: var(--y-radius-md, 8px);
  transition: background 0.2s;
}

.video-call-modal-minimize:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
}

.video-call-modal-minimize:disabled {
  opacity: 0.7;
  cursor: default;
}

.video-call-modal-body {
  flex: 1;
  min-height: 0;
  padding: 0;
}

.video-call-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}

/* На узком viewport (телефон/планшет) видеозвонок всегда полноэкранный */
@media (max-width: 1024px) {
  .video-call-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    align-items: stretch;
    justify-content: stretch;
    background: var(--y-bg-primary, #0d0d0d);
  }
  .video-call-modal-overlay-minimized.video-call-modal-overlay {
    align-items: stretch !important;
    justify-content: stretch !important;
    background: var(--y-bg-primary, #0d0d0d) !important;
    pointer-events: auto;
  }
  .video-call-modal-overlay .video-call-modal,
  .video-call-modal-overlay-minimized .video-call-modal {
    width: 100% !important;
    height: 100% !important;
    min-width: unset !important;
    min-height: unset !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    flex: 1 1 auto;
    position: relative !important;
    left: unset !important;
    top: unset !important;
  }
  .video-call-modal-overlay .video-call-modal .video-call-modal-header,
  .video-call-modal-overlay-minimized .video-call-modal .video-call-modal-header {
    padding: max(10px, env(safe-area-inset-top, 0)) max(20px, env(safe-area-inset-right, 0)) 10px max(20px, env(safe-area-inset-left, 0));
    border-radius: 0;
  }
  .video-call-modal-overlay .video-call-modal .video-call-modal-title,
  .video-call-modal-overlay-minimized .video-call-modal .video-call-modal-title {
    font-size: 16px;
  }
}
/* Страница чата — стандарты Юстихаб */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--y-bg-primary);
  overflow-x: hidden; /* без горизонтальной прокрутки всего окна */
  overflow-y: hidden; /* скролл только внутри .chat-messages, страница не скроллится */
  /* Контейнер для media по ширине области переписки (не всей страницы) */
  container-type: inline-size;
  container-name: chat-area;
}

.chat-toast-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--y-error-bg);
  color: var(--y-error);
  font-size: 14px;
  gap: var(--y-space-md);
}
.chat-toast-error button {
  flex-shrink: 0;
  padding: 6px 12px;
  background: var(--y-error);
  color: #fff;
  border: none;
  border-radius: var(--y-radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.chat-toast-error button:hover {
  opacity: 0.9;
}
.chat-toast-error .chat-toast-retry {
  font-weight: 600;
}

.chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  padding-bottom: 16px;
  background: #25252580;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 50;
  transform: translateZ(0);
  isolation: isolate;
}

/* Полоска свёрнутого видеозвонка под шапкой */
.chat-minimized-call-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(30, 30, 35, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}
.chat-minimized-call-bar-title {
  font-weight: 500;
  color: var(--y-text-primary);
}
.chat-minimized-call-bar-duration {
  color: var(--y-text-tertiary);
  font-variant-numeric: tabular-nums;
  min-width: 2.5em;
}
.chat-minimized-call-bar-expand {
  margin-left: auto;
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--y-accent);
  border: none;
  border-radius: var(--y-radius-sm, 6px);
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-minimized-call-bar-expand:hover {
  opacity: 0.9;
}

.chat-header-content {
  width: 100%;
  max-width: 800px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar-wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Обёртка с градиентной обводкой для аватарки системного чата в шапке */
.chat-header-avatar-wrap-outer--system {
  flex-shrink: 0;
  display: flex;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
}

.chat-header-avatar-wrap-outer--system .chat-header-avatar-wrap {
  width: 40px;
  height: 40px;
}

.chat-header-avatar-wrap--system {
  background: #000;
}

.chat-header-system-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.chat-header-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-header-verified {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.chat-header-avatar-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
}
.chat-header-avatar-initials {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #63b3ed; /* как в аватарке собеседника в переписке (.message-avatar) */
}

/* Аватарка собеседника в шапке — по умолчанию скрыта (показывается только на мобильной) */
.chat-header-user-avatar-wrap {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  align-items: center;
  justify-content: center;
}
.chat-header-user-avatar-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
}
.chat-header-user-avatar-initials {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #63b3ed; /* как в аватарке собеседника в переписке (.message-avatar) */
}
.chat-header-description {
  margin: 0;
  font-size: 13px;
  color: var(--y-text-tertiary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-header-name-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-header-name-button:hover {
  color: var(--y-link-hover, #93c5fd);
}

.back-button {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 4px 4px 0;
  margin-right: 6px;
  color: var(--y-text-primary);
  border-radius: var(--y-radius-md);
  transition: background 0.2s, color 0.2s;
}
.back-button:hover {
  background: transparent;
  color: var(--y-text-primary);
}
.back-button:active {
  background: transparent;
}
.chat-header-info {
  flex: 1;
  min-width: 0;
}
.chat-header-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--y-text-primary);
}
.chat-header-presence {
  font-size: 13px;
  color: var(--y-text-tertiary);
  flex-shrink: 0;
  margin-left: var(--y-space-sm);
}
/* когда «печатает...» выводится отдельной строкой под именем — без отступа */
.chat-header-description.chat-header-presence {
  margin-left: 0;
  padding-left: 0;
}

.chat-header-video-call {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: var(--y-radius-md);
  background: transparent;
  color: var(--y-text-primary);
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-header-video-call-label {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.chat-header-video-call:hover,
.chat-header-video-call:active,
.chat-header-video-call:focus {
  background: transparent;
  color: var(--y-text-primary);
}
.chat-header-video-call:hover {
  opacity: 0.85;
}
.chat-header-video-call:active {
  opacity: 0.7;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden; /* без горизонтальной прокрутки; хвостики остаются в зоне padding-right +14px */
  padding: var(--y-space-sm) var(--y-space-md) 4px;
  padding-left: calc(var(--y-space-md) + env(safe-area-inset-left, 0px));
  /* +14px: место для хвостика (right:-6px + 8px треугольник), чтобы не обрезался при overflow */
  padding-right: calc(var(--y-space-md) + 14px + env(safe-area-inset-right, 0px));
  background: var(--y-bg-primary);
  background-image: url('/chatback.jpg');
  background-repeat: repeat;
  display: flex;
  justify-content: center;
  margin-top: -64px;
  padding-top: 64px;
}
.chat-messages-inner-wrapper {
  width: 100%;
  max-width: 800px;
  min-width: 0; /* не даёт flex-ребёнку раздувать ширину */
  padding: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  /* Не задаём overflow на обёртке: иначе браузер выставляет overflow-y: auto и скролл переходит сюда,
     тогда parentRef (chat-messages) не скроллится, чат открывается с верха и подгрузка вверх не срабатывает.
     Горизонтальную обрезку даёт родитель .chat-messages (overflow-x: hidden). */
  /* padding-bottom задаётся динамически под высоту блока ввода; горизонтальные отступы — у chat-messages */
}

.chat-messages-spacer {
  flex-shrink: 0;
  overflow: hidden;
  /* min-height задаётся динамически под высоту блока ввода — последние сообщения над ним */
}

.chat-input-hint {
  margin: 0;
  padding: 6px var(--y-space-xl) 4px;
  font-size: 13px;
  color: var(--y-text-tertiary);
}

.chat-messages-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--y-text-tertiary);
  font-size: 15px;
}

.chat-messages-preloader {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--y-space-md);
  padding: var(--y-space-xl);
  color: var(--y-text-tertiary);
  font-size: 14px;
}
.chat-messages-preloader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--y-border);
  border-top-color: var(--y-accent);
  border-radius: 50%;
  animation: chat-messages-preloader-spin 0.8s linear infinite;
}
@keyframes chat-messages-preloader-spin {
  to { transform: rotate(360deg); }
}
.chat-messages-preloader-text {
  font-size: 14px;
  color: var(--y-text-tertiary);
}

/* Прелоадер вверху при подгрузке старых сообщений */
.chat-messages-loading-older {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--y-space-md);
  flex-shrink: 0;
}
.chat-messages-loading-older-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--y-border);
  border-top-color: var(--y-accent);
  border-radius: 50%;
  animation: chat-messages-preloader-spin 0.8s linear infinite;
}

/* Разделитель даты: подпись (span) с фоном как у боковой панели (список чатов) */
.message-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--y-space-sm) 0;
}
.message-date-label {
  font-size: 12px;
  color: var(--y-text-tertiary);
  padding: 4px 12px;
  border-radius: var(--y-radius-md);
  background: var(--chat-list-page-bg);
}

/* padding, а не margin: виртуализатор измеряет высоту элемента и не учитывает margin,
   поэтому отступ делаем внутри бокса, чтобы зазор был везде одинаковый */
.message-row {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
  width: 100%;
  min-width: 0; /* не даёт контенту (пузыри, свайп-трек) раздувать ширину и вызывать горизонтальный скролл */
}
.message-row.other {
  gap: var(--y-space-xs); /* отступ между аватаркой и сообщением */
}
.message-row.own {
  justify-content: flex-end; /* Свои сообщения всегда справа */
  gap: 0; /* не влияет на отступ справа */
}
.message-row.own .message-avatar {
  display: none; /* Свои сообщения без аватарки */
}
/* Трек свайпа своих сообщений прижимаем к правому краю; отрицательный margin-right убран — на десктопе из-за него пузыри выходили за границу чата */
.message-row.own .message-bubble-swipe-track {
  margin-left: auto;
}
.message-row.own .message-bubble {
  max-width: 70%;
}
.message-row.own .message-bubble-swipe-track .message-bubble {
  max-width: 70%;
  margin-right: 0;
}
.message-row.other:not(.first-in-group),
.message-row.own:not(.first-in-group) {
  padding-top: 2px;
}
/* Отступ между блоками «свои» и «собеседник» */
.message-row.other + .message-row.own,
.message-row.own + .message-row.other {
  padding-top: 14px;
}
.message-row.other:not(.last-in-group) .message-avatar,
.message-row.own:not(.last-in-group) .message-avatar {
  background: transparent;
  color: transparent;
}
/* В середине группы системных сообщений — аватар прозрачный (как у обычного собеседника), отступ сохраняется */
.message-row.other:not(.last-in-group) .message-avatar-wrap--system {
  background: transparent;
}
.message-row.other:not(.last-in-group) .message-avatar-wrap--system .message-avatar {
  background: transparent !important;
}
.message-row .message-bubble {
  margin: 0;
  max-width: 70%;
}
/* Пузырь собеседника — по контенту, без лишних переносов; ограничение ширины на треке */
.message-row.other .message-bubble-swipe-track .message-bubble {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
}
.message-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--y-radius-round);
  background: #2d3748; /* Темно-серый для собеседника */
  color: #63b3ed; /* Светло-голубой текст */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.message-avatar-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
  display: block;
}
.message-avatar .message-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.message-avatar--system {
  background: #000 !important;
}

/* Обёртка с градиентной обводкой для аватарки у системных сообщений в чате */
.message-avatar-wrap--system {
  flex-shrink: 0;
  display: flex;
  padding: 2px;
  border-radius: var(--y-radius-round);
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
}

.message-avatar-wrap--system .message-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  margin: 0;
}

.message-avatar-system-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.message-avatar-system-icon svg {
  display: block;
}

.message-row.own .message-avatar {
  background: linear-gradient(135deg, var(--y-accent) 0%, #a855f7 100%); /* Градиент для своих */
  color: rgba(255, 255, 255, 0.95);
}

.chat-page .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--y-text-tertiary);
}

/* Модалка «уже есть активный видеозвонок» */
.active-call-block-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.active-call-block-modal {
  background: var(--y-bg-primary);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  padding: 24px;
  max-width: 360px;
  box-shadow: var(--y-shadow-modal, 0 8px 32px rgba(0, 0, 0, 0.3));
}
.active-call-block-text {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--y-text-primary);
}
.active-call-block-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--y-accent);
  border: none;
  border-radius: var(--y-radius-sm);
  cursor: pointer;
}
.active-call-block-btn:hover {
  opacity: 0.9;
}

@media (min-width: 769px) {
  .chat-page .back-button {
    display: none;
  }
  /* На десктопе правый отступ без +14px под хвостик (он нужен только на мобиле) */
  .chat-page .chat-messages {
    padding-right: calc(var(--y-space-md) + env(safe-area-inset-right, 0px));
  }
}

/* Мобильная шапка чата: шеврон назад, без аватарки, кнопка видеозвонка — только иконка */
/* Мобильный чат: без аватарок у сообщений, пузыри до 90% ширины; шапка и поле ввода закреплены */
@media (max-width: 768px) {
  .chat-page {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  /* Нижняя полоска — фон чата под блоком ввода (z-index ниже, чем у блока ввода), чтобы не было серой полосы */
  .chat-page::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: max(env(safe-area-inset-bottom, 0px), 50px);
    background-color: var(--y-bg-primary);
    background-image: url('/chatback.jpg');
    background-repeat: repeat;
    z-index: 1;
    pointer-events: none;
  }
  .chat-page .chat-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 50;
    transform: translateZ(0);
    isolation: isolate;
  }
  .chat-page .chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    /* auto — эластичная прокрутка внизу (и вверху): при достижении конца список слегка «протягивается» и возвращается, как в Telegram */
    overscroll-behavior-y: auto;
    padding-right: calc(var(--y-space-md) + env(safe-area-inset-right, 0px));
    padding-left: calc(var(--y-space-md) + env(safe-area-inset-left, 0px));
    /* Фон chatback.jpg наследуется от .chat-messages (как на десктопе) */
    transform: translateZ(0);
    will-change: scroll-position;
    /* Контент заходит под шапку — видна прозрачность/backdrop шапки */
    margin-top: -64px;
    padding-top: calc(64px + var(--y-space-sm));
    /* padding-bottom задаётся динамически в ChatPage (bottomOffset) */
  }
  /* Высота спейсера задаётся динамически в ChatPage (height + minHeight: bottomOffset) */
  .chat-page .chat-messages-spacer {
    flex-shrink: 0;
  }
  .chat-page .message-input-container {
    flex-shrink: 0;
    margin-top: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: calc(var(--y-space-md) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--y-space-md) + env(safe-area-inset-right, 0px));
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.88) 100%);
    z-index: 20;
  }
  .chat-page .chat-header-avatar-wrap {
    display: none;
  }
  /* Аватарка собеседника в шапке — показываем на мобильной */
  .chat-page .chat-header-user-avatar-wrap {
    display: flex;
  }
  /* Системный чат «Обновления»: только в шапке показываем аватар с иконкой и градиентной обводкой; в переписке аватарки скрыты */
  .chat-page .chat-header-avatar-wrap-outer--system {
    display: flex;
  }
  .chat-page .chat-header-avatar-wrap-outer--system .chat-header-avatar-wrap {
    display: flex;
  }
  .chat-page .chat-header-video-call-label {
    display: none;
  }
  .chat-page .chat-header-video-call {
    padding: 0 12px;
  }
  .chat-page .message-avatar {
    display: none;
  }
  .chat-page .message-avatar-wrap--system {
    display: none;
  }
  .chat-page .message-row.own .message-bubble-swipe-track {
    margin-right: 0;
  }
  .chat-page .message-row .message-bubble,
  .chat-page .message-row.own .message-bubble {
    max-width: 90%;
  }
  .chat-page .message-bubble-swipe-track.other {
    width: 90%;
    max-width: 90%;
  }
}
.app {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--y-bg-primary);
}

/* Подсказка: включить звук при новых сообщениях (браузер требует user gesture) */
.audio-hint-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(0, 113, 227, 0.95);
  color: #fff;
  font-size: 14px;
  border-radius: 12px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s, transform 0.2s;
}
.audio-hint-banner:hover {
  opacity: 0.95;
  transform: translateX(-50%) scale(1.02);
}

/* На мобильном баннер не показываем */
@media (max-width: 768px) {
  .audio-hint-banner {
    display: none;
  }
}
/* Layout мессенджера — тёмная тема Юстихаб */
.messenger-layout {
  display: flex;
  height: 100vh;
  height: 100dvh; /* iOS/iPad: корректная высота viewport без адресной строки */
  width: 100%;
  overflow: hidden;
  background: var(--y-bg-primary);
}

.messenger-sidebar {
  flex-shrink: 0;
  border-right: 0;
  background-color: rgb(24 25 26);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Широкая зона для захвата (12px), видимая полоса при наведении */
.messenger-resize-handle {
  width: 12px;
  flex-shrink: 0;
  cursor: col-resize;
  background: transparent;
  transition: background 0.2s ease;
  position: relative;
  margin-left: -6px;
  margin-right: -6px;
  z-index: 10;
}
.messenger-resize-handle::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: transparent;
  transition: background 0.2s ease, width 0.2s ease;
}
.messenger-resize-handle:hover,
.messenger-resize-handle:hover::before {
  background: #33333345;
}
.messenger-resize-handle:hover::before {
  width: 4px;
}
.messenger-layout.resizing .messenger-resize-handle::before {
  width: 4px;
  background: #33333345;
}
.messenger-layout.resizing .messenger-resize-handle {
  background: #33333345;
}
.messenger-layout.resizing {
  cursor: col-resize;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.messenger-layout.resizing * {
  cursor: col-resize;
}

.messenger-main {
  flex: 1;
  min-width: 0;
  min-height: 0; /* без этого flex-ребёнок растягивается по контенту и появляется скролл страницы */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--y-bg-primary);
}

/* Баннер уведомлений — на всю ширину правого блока, синий фон; появляется через 2 с с анимацией сверху вниз */
.notifications-banner {
  flex-shrink: 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  padding-top: env(safe-area-inset-top, 0px);
  background: #2563eb;
  color: #fff;
  text-align: center;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.notifications-banner.notifications-banner--visible {
  max-height: 180px;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

/* iPad / планшет: баннер как фиксированный оверлей — не ломает flex layout (тикет: "поехала вся верстка") */
@media (max-width: 1024px) {
  .messenger-main .notifications-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  .messenger-main .notifications-banner.notifications-banner--visible {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
  }
}
.notifications-banner__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.notifications-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
.notifications-banner__btn {
  flex-shrink: 0;
  min-width: 140px;
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #2563eb;
  background: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.notifications-banner__btn:hover:not(:disabled) {
  background: #f1f5f9;
}
.notifications-banner__btn:disabled {
  cursor: default;
  opacity: 0.85;
}
/* Спиннер на белой кнопке — синий, иначе не видно */
.notifications-banner__btn .search-spinner {
  border-color: rgba(37, 99, 235, 0.35);
  border-top-color: #2563eb;
}
.notifications-banner__hint {
  margin: 8px 0 0;
  font-size: 13px;
  opacity: 0.95;
  text-align: center;
}

.messenger-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--y-text-tertiary);
  font-size: 16px;
  padding: var(--y-space-xl);
  text-align: center;
}

.messenger-sidebar .chat-list-page {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.messenger-sidebar .chat-list {
  flex: 1;
  overflow-y: auto;
}
.messenger-sidebar .chat-list-header,
.messenger-sidebar .search-by-phone {
  flex-shrink: 0;
}
.messenger-main .chat-page {
  height: 100%;
}

.messenger-chat-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Мобильный layout: высота строго по видимой области, блок ввода прижат к низу экрана */
@media (max-width: 768px) {
  .messenger-layout {
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .messenger-resize-handle {
    display: none;
  }
  .messenger-sidebar {
    width: 100% !important;
    height: 100%;
    min-height: 0;
  }
  .messenger-main {
    height: 100%;
    min-height: 0;
  }
  .messenger-main .chat-page {
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }
  .messenger-layout.messenger-layout--conversation-open .messenger-sidebar {
    display: none;
  }
  .messenger-layout:not(.messenger-layout--conversation-open) .messenger-main {
    display: none;
  }
  /* Панель чата выезжает справа налево; без transform, чтобы position:fixed у блока ввода был относительно viewport */
  .messenger-main {
    overflow: hidden;
    position: relative;
  }
  .messenger-chat-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 100%;
    transition: left 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .messenger-chat-panel--visible {
    left: 0;
  }
  /* Внутри чата на мобильной не показываем баннер «Уведомления заблокированы» */
  .messenger-layout.messenger-layout--conversation-open .notifications-banner {
    display: none !important;
  }
}
/* Палитра Юстихаб — UI СТАНДАРТЫ ИНТЕРФЕЙСОВ */
:root {
  /* Фоны */
  --y-bg-primary: #000000;
  --y-bg-secondary: rgb(16, 16, 21);
  --y-bg-tertiary: #141414;
  --y-bg-card: rgba(255, 255, 255, 0.06);
  --y-bg-card-hover: rgba(255, 255, 255, 0.08);
  --y-bg-input: rgba(255, 255, 255, 0.06);
  --y-bg-input-focus: rgba(255, 255, 255, 0.08);

  /* Акценты */
  --y-accent: #0071e3;
  --y-accent-hover: #0077ed;
  --y-gradient: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  --y-badge: #b0a6c7;

  /* Текст */
  --y-text-primary: rgba(255, 255, 255, 0.9);
  --y-text-secondary: rgba(255, 255, 255, 0.7);
  --y-text-tertiary: rgba(255, 255, 255, 0.5);
  --y-text-muted: rgba(255, 255, 255, 0.38);
  --y-placeholder: rgba(255, 255, 255, 0.38);

  /* Границы */
  --y-border: rgba(255, 255, 255, 0.08);
  --y-border-active: rgba(255, 255, 255, 0.15);
  --y-border-focus: rgba(255, 255, 255, 0.3);

  /* Статусы */
  --y-success: #34a853;
  --y-success-bg: rgba(52, 168, 83, 0.15);
  --y-error: #ea4335;
  --y-error-bg: rgba(234, 67, 53, 0.15);
  --y-warning: rgb(255, 193, 7);

  /* Чаты — фоны и пузыри (удобно менять тему) */
  --chat-bubble-own: #284972;
  --chat-bubble-other: #18191a;
  --chat-header-bg: rgb(33 33 33);
  --chat-list-page-bg: rgb(28 28 28);
  --chat-input-container-bg: rgb(33 33 33);
  /* Статусы сообщений (доставлено / прочитано) */
  --message-status-delivered: #ffffff54;
  --message-status-read: #16cbff;
  /* Кнопка отправки в неактивном состоянии */
  --message-send-button-disabled: #6b7280;

  /* Радиусы */
  --y-radius-sm: 8px;
  --y-radius-md: 12px;
  --y-radius-lg: 20px;
  --y-radius-xl: 24px;
  --y-radius-round: 50%;

  /* Отступы */
  --y-space-xs: 8px;
  --y-space-sm: 12px;
  --y-space-md: 16px;
  --y-space-lg: 20px;
  --y-space-xl: 24px;

  /* Тени */
  --y-shadow-modal: 0 24px 48px rgba(0, 0, 0, 0.5);
  --y-backdrop: rgba(0, 0, 0, 0.6);
}
/* Noto Color Emoji для реакций в чате (fallback: системные эмодзи-шрифты).
   Предзагрузка в index.html — чтобы при первой отрисовке уже был цветной эмодзи. */
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-display: block;
  font-weight: 400;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/noto-color-emoji@latest/emoji-400-normal.woff2) format('woff2'),
       url(https://cdn.jsdelivr.net/fontsource/fonts/noto-color-emoji@latest/emoji-400-normal.woff) format('woff');
}
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
/* ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}
::before,
::after {
  --tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
  color: inherit;
  text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
  font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
  font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
  text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
  outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
  box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
  vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
  -webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
  display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}
fieldset {
  margin: 0;
  padding: 0;
}
legend {
  padding: 0;
}
ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
  resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
  cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
  max-width: 100%;
  height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
input:where([type='text']),input:where(:not([type])),input:where([type='email']),input:where([type='url']),input:where([type='password']),input:where([type='number']),input:where([type='date']),input:where([type='datetime-local']),input:where([type='month']),input:where([type='search']),input:where([type='tel']),input:where([type='time']),input:where([type='week']),select:where([multiple]),textarea,select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: #fff;
  border-color: #6b7280;
  border-width: 1px;
  border-radius: 0px;
  padding-top: 0.5rem;
  padding-right: 0.75rem;
  padding-bottom: 0.5rem;
  padding-left: 0.75rem;
  font-size: 1rem;
  line-height: 1.5rem;
  --tw-shadow: 0 0 #0000;
}
input:where([type='text']):focus, input:where(:not([type])):focus, input:where([type='email']):focus, input:where([type='url']):focus, input:where([type='password']):focus, input:where([type='number']):focus, input:where([type='date']):focus, input:where([type='datetime-local']):focus, input:where([type='month']):focus, input:where([type='search']):focus, input:where([type='tel']):focus, input:where([type='time']):focus, input:where([type='week']):focus, select:where([multiple]):focus, textarea:focus, select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: #2563eb;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  border-color: #2563eb;
}
input::-moz-placeholder, textarea::-moz-placeholder {
  color: #6b7280;
  opacity: 1;
}
input::placeholder,textarea::placeholder {
  color: #6b7280;
  opacity: 1;
}
::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
::-webkit-date-and-time-value {
  min-height: 1.5em;
  text-align: inherit;
}
::-webkit-datetime-edit {
  display: inline-flex;
}
::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field {
  padding-top: 0;
  padding-bottom: 0;
}
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
}
select:where([multiple]),select:where([size]:not([size="1"])) {
  background-image: initial;
  background-position: initial;
  background-repeat: unset;
  background-size: initial;
  padding-right: 0.75rem;
  -webkit-print-color-adjust: unset;
          print-color-adjust: unset;
}
input:where([type='checkbox']),input:where([type='radio']) {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding: 0;
  -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
  display: inline-block;
  vertical-align: middle;
  background-origin: border-box;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  flex-shrink: 0;
  height: 1rem;
  width: 1rem;
  color: #2563eb;
  background-color: #fff;
  border-color: #6b7280;
  border-width: 1px;
  --tw-shadow: 0 0 #0000;
}
input:where([type='checkbox']) {
  border-radius: 0px;
}
input:where([type='radio']) {
  border-radius: 100%;
}
input:where([type='checkbox']):focus,input:where([type='radio']):focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
  --tw-ring-offset-width: 2px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: #2563eb;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}
input:where([type='checkbox']):checked,input:where([type='radio']):checked {
  border-color: transparent;
  background-color: currentColor;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
input:where([type='checkbox']):checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}
@media (forced-colors: active)  {
  input:where([type='checkbox']):checked {
    -webkit-appearance: auto;
       -moz-appearance: auto;
            appearance: auto;
  }
}
input:where([type='radio']):checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
}
@media (forced-colors: active)  {
  input:where([type='radio']):checked {
    -webkit-appearance: auto;
       -moz-appearance: auto;
            appearance: auto;
  }
}
input:where([type='checkbox']):checked:hover,input:where([type='checkbox']):checked:focus,input:where([type='radio']):checked:hover,input:where([type='radio']):checked:focus {
  border-color: transparent;
  background-color: currentColor;
}
input:where([type='checkbox']):indeterminate {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
  border-color: transparent;
  background-color: currentColor;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
@media (forced-colors: active)  {
  input:where([type='checkbox']):indeterminate {
    -webkit-appearance: auto;
       -moz-appearance: auto;
            appearance: auto;
  }
}
input:where([type='checkbox']):indeterminate:hover,input:where([type='checkbox']):indeterminate:focus {
  border-color: transparent;
  background-color: currentColor;
}
input:where([type='file']) {
  background: unset;
  border-color: inherit;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-size: unset;
  line-height: inherit;
}
input:where([type='file']):focus {
  outline: 1px solid ButtonText;
  outline: 1px auto -webkit-focus-ring-color;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--y-bg-primary);
    color: var(--y-text-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
    overflow: hidden; /* скролл только внутри чата (.chat-messages), не на странице */
  }
#root {
    width: 100%;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }
.container {
  width: 100%;
}
@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}
.pointer-events-none {
  pointer-events: none;
}
.\!visible {
  visibility: visible !important;
}
.visible {
  visibility: visible;
}
.invisible {
  visibility: hidden;
}
.collapse {
  visibility: collapse;
}
.static {
  position: static;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.sticky {
  position: sticky;
}
.-inset-1 {
  inset: -0.25rem;
}
.inset-0 {
  inset: 0px;
}
.inset-y-0 {
  top: 0px;
  bottom: 0px;
}
.bottom-0 {
  bottom: 0px;
}
.left-0 {
  left: 0px;
}
.left-1 {
  left: 0.25rem;
}
.left-1\/2 {
  left: 50%;
}
.left-2 {
  left: 0.5rem;
}
.right-0 {
  right: 0px;
}
.right-1 {
  right: 0.25rem;
}
.right-1\/2 {
  right: 50%;
}
.top-0 {
  top: 0px;
}
.isolate {
  isolation: isolate;
}
.isolation-auto {
  isolation: auto;
}
.-z-10 {
  z-index: -10;
}
.z-0 {
  z-index: 0;
}
.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}
.z-50 {
  z-index: 50;
}
.col-span-1 {
  grid-column: span 1 / span 1;
}
.col-span-10 {
  grid-column: span 10 / span 10;
}
.col-span-11 {
  grid-column: span 11 / span 11;
}
.col-span-12 {
  grid-column: span 12 / span 12;
}
.col-span-2 {
  grid-column: span 2 / span 2;
}
.col-span-3 {
  grid-column: span 3 / span 3;
}
.col-span-4 {
  grid-column: span 4 / span 4;
}
.col-span-5 {
  grid-column: span 5 / span 5;
}
.col-span-6 {
  grid-column: span 6 / span 6;
}
.col-span-7 {
  grid-column: span 7 / span 7;
}
.col-span-8 {
  grid-column: span 8 / span 8;
}
.col-span-9 {
  grid-column: span 9 / span 9;
}
.mx-2\.5 {
  margin-left: 0.625rem;
  margin-right: 0.625rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.my-6 {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.-mb-px {
  margin-bottom: -1px;
}
.-ml-0 {
  margin-left: -0px;
}
.-ml-0\.5 {
  margin-left: -0.125rem;
}
.-ml-1 {
  margin-left: -0.25rem;
}
.-ml-1\.5 {
  margin-left: -0.375rem;
}
.-ml-px {
  margin-left: -1px;
}
.-mr-1 {
  margin-right: -0.25rem;
}
.mb-0 {
  margin-bottom: 0px;
}
.mb-1\.5 {
  margin-bottom: 0.375rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.ml-1\.5 {
  margin-left: 0.375rem;
}
.ml-2 {
  margin-left: 0.5rem;
}
.ml-px {
  margin-left: 1px;
}
.mr-1 {
  margin-right: 0.25rem;
}
.mr-1\.5 {
  margin-right: 0.375rem;
}
.mr-10 {
  margin-right: 2.5rem;
}
.mr-2 {
  margin-right: 0.5rem;
}
.mr-2\.5 {
  margin-right: 0.625rem;
}
.mr-20 {
  margin-right: 5rem;
}
.mr-3 {
  margin-right: 0.75rem;
}
.mr-4 {
  margin-right: 1rem;
}
.mr-5 {
  margin-right: 1.25rem;
}
.mr-8 {
  margin-right: 2rem;
}
.mt-0\.5 {
  margin-top: 0.125rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.inline {
  display: inline;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.inline-table {
  display: inline-table;
}
.table-caption {
  display: table-caption;
}
.table-cell {
  display: table-cell;
}
.table-column {
  display: table-column;
}
.table-column-group {
  display: table-column-group;
}
.table-footer-group {
  display: table-footer-group;
}
.table-header-group {
  display: table-header-group;
}
.table-row-group {
  display: table-row-group;
}
.table-row {
  display: table-row;
}
.flow-root {
  display: flow-root;
}
.grid {
  display: grid;
}
.inline-grid {
  display: inline-grid;
}
.contents {
  display: contents;
}
.list-item {
  display: list-item;
}
.hidden {
  display: none;
}
.size-3\.5 {
  width: 0.875rem;
  height: 0.875rem;
}
.h-0 {
  height: 0px;
}
.h-10 {
  height: 2.5rem;
}
.h-12 {
  height: 3rem;
}
.h-2 {
  height: 0.5rem;
}
.h-3 {
  height: 0.75rem;
}
.h-3\.5 {
  height: 0.875rem;
}
.h-4 {
  height: 1rem;
}
.h-40 {
  height: 10rem;
}
.h-5 {
  height: 1.25rem;
}
.h-6 {
  height: 1.5rem;
}
.h-7 {
  height: 1.75rem;
}
.h-8 {
  height: 2rem;
}
.h-80 {
  height: 20rem;
}
.h-9 {
  height: 2.25rem;
}
.h-\[1px\] {
  height: 1px;
}
.h-full {
  height: 100%;
}
.max-h-\[228px\] {
  max-height: 228px;
}
.min-h-full {
  min-height: 100%;
}
.w-0 {
  width: 0px;
}
.w-1 {
  width: 0.25rem;
}
.w-1\/2 {
  width: 50%;
}
.w-10 {
  width: 2.5rem;
}
.w-16 {
  width: 4rem;
}
.w-2 {
  width: 0.5rem;
}
.w-28 {
  width: 7rem;
}
.w-3 {
  width: 0.75rem;
}
.w-3\.5 {
  width: 0.875rem;
}
.w-4 {
  width: 1rem;
}
.w-48 {
  width: 12rem;
}
.w-5 {
  width: 1.25rem;
}
.w-6 {
  width: 1.5rem;
}
.w-7 {
  width: 1.75rem;
}
.w-9 {
  width: 2.25rem;
}
.w-\[90\%\] {
  width: 90%;
}
.w-\[var\(--button-width\)\] {
  width: var(--button-width);
}
.w-full {
  width: 100%;
}
.w-max {
  width: -moz-max-content;
  width: max-content;
}
.w-screen {
  width: 100vw;
}
.min-w-44 {
  min-width: 11rem;
}
.min-w-\[10rem\] {
  min-width: 10rem;
}
.min-w-min {
  min-width: -moz-min-content;
  min-width: min-content;
}
.max-w-\[100px\] {
  max-width: 100px;
}
.max-w-full {
  max-width: 100%;
}
.max-w-lg {
  max-width: 32rem;
}
.max-w-sm {
  max-width: 24rem;
}
.max-w-xs {
  max-width: 20rem;
}
.flex-1 {
  flex: 1 1 0%;
}
.flex-none {
  flex: none;
}
.shrink {
  flex-shrink: 1;
}
.shrink-0 {
  flex-shrink: 0;
}
.grow {
  flex-grow: 1;
}
.border-collapse {
  border-collapse: collapse;
}
.-translate-x-1\/2 {
  --tw-translate-x: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.-translate-y-4 {
  --tw-translate-y: -1rem;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.translate-x-0 {
  --tw-translate-x: 0px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.translate-x-1\/2 {
  --tw-translate-x: 50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.translate-x-5 {
  --tw-translate-x: 1.25rem;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.translate-y-0 {
  --tw-translate-y: 0px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.-rotate-180 {
  --tw-rotate: -180deg;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.-rotate-90 {
  --tw-rotate: -90deg;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.scale-100 {
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.scale-95 {
  --tw-scale-x: .95;
  --tw-scale-y: .95;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.cursor-default {
  cursor: default;
}
.cursor-not-allowed {
  cursor: not-allowed;
}
.cursor-pointer {
  cursor: pointer;
}
.touch-pinch-zoom {
  --tw-pinch-zoom: pinch-zoom;
  touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom);
}
.select-none {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.resize {
  resize: both;
}
.snap-mandatory {
  --tw-scroll-snap-strictness: mandatory;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-10 {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
.grid-cols-11 {
  grid-template-columns: repeat(11, minmax(0, 1fr));
}
.grid-cols-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.grid-cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.grid-cols-7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.grid-cols-8 {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.grid-cols-9 {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}
.grid-cols-none {
  grid-template-columns: none;
}
.flex-row {
  flex-direction: row;
}
.flex-row-reverse {
  flex-direction: row-reverse;
}
.flex-col {
  flex-direction: column;
}
.flex-col-reverse {
  flex-direction: column-reverse;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-nowrap {
  flex-wrap: nowrap;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.items-center {
  align-items: center;
}
.items-baseline {
  align-items: baseline;
}
.items-stretch {
  align-items: stretch;
}
.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-around {
  justify-content: space-around;
}
.justify-evenly {
  justify-content: space-evenly;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-x-1 {
  -moz-column-gap: 0.25rem;
       column-gap: 0.25rem;
}
.space-x-0\.5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(0.125rem * var(--tw-space-x-reverse));
  margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-1 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(0.25rem * var(--tw-space-x-reverse));
  margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-1\.5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(0.375rem * var(--tw-space-x-reverse));
  margin-left: calc(0.375rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(0.5rem * var(--tw-space-x-reverse));
  margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(1rem * var(--tw-space-x-reverse));
  margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-6 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(1.5rem * var(--tw-space-x-reverse));
  margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-8 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(2rem * var(--tw-space-x-reverse));
  margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-y-0 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0px * var(--tw-space-y-reverse));
}
.space-y-1 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.375rem * var(--tw-space-y-reverse));
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}
.space-y-reverse > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 1;
}
.space-x-reverse > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
}
.divide-x > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-x-reverse: 0;
  border-right-width: calc(1px * var(--tw-divide-x-reverse));
  border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse)));
}
.divide-y > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-y-reverse: 0;
  border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
  border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
}
.divide-y-reverse > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-y-reverse: 1;
}
.divide-x-reverse > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-x-reverse: 1;
}
.overflow-auto {
  overflow: auto;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-visible {
  overflow: visible;
}
.overflow-y-auto {
  overflow-y: auto;
}
.overflow-x-clip {
  overflow-x: clip;
}
.overflow-x-scroll {
  overflow-x: scroll;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-ellipsis {
  text-overflow: ellipsis;
}
.text-clip {
  text-overflow: clip;
}
.whitespace-nowrap {
  white-space: nowrap;
}
.text-wrap {
  text-wrap: wrap;
}
.\!rounded-none {
  border-radius: 0px !important;
}
.rounded {
  border-radius: 0.25rem;
}
.rounded-\[1px\] {
  border-radius: 1px;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-b {
  border-bottom-right-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}
.rounded-e {
  border-start-end-radius: 0.25rem;
  border-end-end-radius: 0.25rem;
}
.rounded-l {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}
.rounded-l-none {
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}
.rounded-r {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}
.rounded-r-none {
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
}
.rounded-s {
  border-start-start-radius: 0.25rem;
  border-end-start-radius: 0.25rem;
}
.rounded-t {
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}
.rounded-bl {
  border-bottom-left-radius: 0.25rem;
}
.rounded-br {
  border-bottom-right-radius: 0.25rem;
}
.rounded-ee {
  border-end-end-radius: 0.25rem;
}
.rounded-es {
  border-end-start-radius: 0.25rem;
}
.rounded-se {
  border-start-end-radius: 0.25rem;
}
.rounded-ss {
  border-start-start-radius: 0.25rem;
}
.rounded-tl {
  border-top-left-radius: 0.25rem;
}
.rounded-tr {
  border-top-right-radius: 0.25rem;
}
.border {
  border-width: 1px;
}
.border-2 {
  border-width: 2px;
}
.border-x {
  border-left-width: 1px;
  border-right-width: 1px;
}
.border-y {
  border-top-width: 1px;
  border-bottom-width: 1px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-b-4 {
  border-bottom-width: 4px;
}
.border-e {
  border-inline-end-width: 1px;
}
.border-l {
  border-left-width: 1px;
}
.border-l-4 {
  border-left-width: 4px;
}
.border-r {
  border-right-width: 1px;
}
.border-r-4 {
  border-right-width: 4px;
}
.border-s {
  border-inline-start-width: 1px;
}
.border-t {
  border-top-width: 1px;
}
.border-t-4 {
  border-top-width: 4px;
}
.border-t-\[1px\] {
  border-top-width: 1px;
}
.border-dashed {
  border-style: dashed;
}
.border-none {
  border-style: none;
}
.border-red-500 {
  --tw-border-opacity: 1;
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
}
.border-transparent {
  border-color: transparent;
}
.bg-gray-100 {
  --tw-bg-opacity: 1;
  background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
}
.bg-gray-100\/50 {
  background-color: rgb(243 244 246 / 0.5);
}
.bg-slate-950\/30 {
  background-color: rgb(2 6 23 / 0.3);
}
.bg-transparent {
  background-color: transparent;
}
.bg-opacity-10 {
  --tw-bg-opacity: 0.1;
}
.bg-opacity-20 {
  --tw-bg-opacity: 0.2;
}
.bg-opacity-40 {
  --tw-bg-opacity: 0.4;
}
.bg-repeat {
  background-repeat: repeat;
}
.stroke-1 {
  stroke-width: 1;
}
.p-0 {
  padding: 0px;
}
.p-0\.5 {
  padding: 0.125rem;
}
.p-1 {
  padding: 0.25rem;
}
.p-2\.5 {
  padding: 0.625rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}
.px-1\.5 {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.px-2\.5 {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.px-3\.5 {
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}
.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-3\.5 {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}
.py-\[10px\] {
  padding-top: 10px;
  padding-bottom: 10px;
}
.pb-3 {
  padding-bottom: 0.75rem;
}
.pl-10 {
  padding-left: 2.5rem;
}
.pl-11 {
  padding-left: 2.75rem;
}
.pl-2 {
  padding-left: 0.5rem;
}
.pl-2\.5 {
  padding-left: 0.625rem;
}
.pl-3 {
  padding-left: 0.75rem;
}
.pl-4 {
  padding-left: 1rem;
}
.pr-1 {
  padding-right: 0.25rem;
}
.pr-1\.5 {
  padding-right: 0.375rem;
}
.pr-12 {
  padding-right: 3rem;
}
.pr-14 {
  padding-right: 3.5rem;
}
.pr-16 {
  padding-right: 4rem;
}
.pr-2 {
  padding-right: 0.5rem;
}
.pr-2\.5 {
  padding-right: 0.625rem;
}
.pr-3 {
  padding-right: 0.75rem;
}
.pr-4 {
  padding-right: 1rem;
}
.pr-8 {
  padding-right: 2rem;
}
.pt-2 {
  padding-top: 0.5rem;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.align-top {
  vertical-align: top;
}
.align-middle {
  vertical-align: middle;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.font-bold {
  font-weight: 700;
}
.font-medium {
  font-weight: 500;
}
.font-normal {
  font-weight: 400;
}
.font-semibold {
  font-weight: 600;
}
.uppercase {
  text-transform: uppercase;
}
.lowercase {
  text-transform: lowercase;
}
.capitalize {
  text-transform: capitalize;
}
.normal-case {
  text-transform: none;
}
.italic {
  font-style: italic;
}
.not-italic {
  font-style: normal;
}
.normal-nums {
  font-variant-numeric: normal;
}
.ordinal {
  --tw-ordinal: ordinal;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.slashed-zero {
  --tw-slashed-zero: slashed-zero;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.lining-nums {
  --tw-numeric-figure: lining-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.oldstyle-nums {
  --tw-numeric-figure: oldstyle-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.proportional-nums {
  --tw-numeric-spacing: proportional-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.diagonal-fractions {
  --tw-numeric-fraction: diagonal-fractions;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.stacked-fractions {
  --tw-numeric-fraction: stacked-fractions;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.leading-none {
  line-height: 1;
}
.text-\[\#d1d5db\]\/15 {
  color: rgb(209 213 219 / 0.15);
}
.text-inherit {
  color: inherit;
}
.text-red-500 {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}
.text-rose-500 {
  --tw-text-opacity: 1;
  color: rgb(244 63 94 / var(--tw-text-opacity, 1));
}
.text-transparent {
  color: transparent;
}
.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.underline {
  text-decoration-line: underline;
}
.overline {
  text-decoration-line: overline;
}
.line-through {
  text-decoration-line: line-through;
}
.no-underline {
  text-decoration-line: none;
}
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.subpixel-antialiased {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}
.opacity-0 {
  opacity: 0;
}
.opacity-100 {
  opacity: 1;
}
.opacity-20 {
  opacity: 0.2;
}
.opacity-30 {
  opacity: 0.3;
}
.opacity-40 {
  opacity: 0.4;
}
.opacity-50 {
  opacity: 0.5;
}
.shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.outline-none {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.outline {
  outline-style: solid;
}
.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.ring-1 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.ring-2 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.ring-inset {
  --tw-ring-inset: inset;
}
.ring-opacity-20 {
  --tw-ring-opacity: 0.2;
}
.ring-opacity-40 {
  --tw-ring-opacity: 0.4;
}
.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow {
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.grayscale {
  --tw-grayscale: grayscale(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.invert {
  --tw-invert: invert(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.sepia {
  --tw-sepia: sepia(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.backdrop-blur {
  --tw-backdrop-blur: blur(8px);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-grayscale {
  --tw-backdrop-grayscale: grayscale(100%);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-invert {
  --tw-backdrop-invert: invert(100%);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-sepia {
  --tw-backdrop-sepia: sepia(100%);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-filter {
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-100 {
  transition-duration: 100ms;
}
.duration-200 {
  transition-duration: 200ms;
}
.duration-300 {
  transition-duration: 300ms;
}
.duration-500 {
  transition-duration: 500ms;
}
.duration-75 {
  transition-duration: 75ms;
}
.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.ease-linear {
  transition-timing-function: linear;
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.\[--anchor-gap\:4px\] {
  --anchor-gap: 4px;
}
.\[appearance\:textfield\] {
  -webkit-appearance: textfield;
     -moz-appearance: textfield;
          appearance: textfield;
}
.\[scrollbar-width\:none\] {
  scrollbar-width: none;
}
/* Мобильная версия: полноэкранный layout (100dvh); предотвращение overscroll в зону safe-area */
@media (max-width: 768px) {
  html {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior: none;
  }
  body {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    background-color: var(--chat-list-page-bg);
    overscroll-behavior: none;
  }
  body.in-chat {
    background-color: var(--y-bg-primary);
    background-image: url('/chatback.jpg');
    background-repeat: repeat;
  }
  #root {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    overscroll-behavior: none;
  }
}
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-size: 16px;
  font-weight: 500;
  color: var(--y-text-tertiary);
  background: var(--y-bg-primary);
}
/* Скроллбары по стандартам */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) var(--y-bg-tertiary);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: var(--y-bg-tertiary);
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
.placeholder\:text-red-500::-moz-placeholder {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}
.placeholder\:text-red-500::placeholder {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}
.first\:rounded-l-\[4px\]:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.last\:rounded-r-\[4px\]:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}
.focus-within\:relative:focus-within {
  position: relative;
}
.hover\:border-b-2:hover {
  border-bottom-width: 2px;
}
.hover\:bg-opacity-20:hover {
  --tw-bg-opacity: 0.2;
}
.hover\:underline:hover {
  text-decoration-line: underline;
}
.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.focus\:ring-0:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.focus\:ring-2:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.disabled\:hover\:bg-transparent:hover:disabled {
  background-color: transparent;
}
.group:hover .group-hover\:bg-opacity-30 {
  --tw-bg-opacity: 0.3;
}
.group:active .group-active\:scale-95 {
  --tw-scale-x: .95;
  --tw-scale-y: .95;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.data-\[selected\]\:border-b-2[data-selected] {
  border-bottom-width: 2px;
}
.data-\[closed\]\:opacity-0[data-closed] {
  opacity: 0;
}
.data-\[enter\]\:duration-300[data-enter] {
  transition-duration: 300ms;
}
.data-\[leave\]\:duration-200[data-leave] {
  transition-duration: 200ms;
}
.data-\[enter\]\:ease-out[data-enter] {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.data-\[leave\]\:ease-in[data-leave] {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
@media (min-width: 640px) {
  .sm\:col-span-1 {
    grid-column: span 1 / span 1;
  }
  .sm\:col-span-10 {
    grid-column: span 10 / span 10;
  }
  .sm\:col-span-11 {
    grid-column: span 11 / span 11;
  }
  .sm\:col-span-12 {
    grid-column: span 12 / span 12;
  }
  .sm\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .sm\:col-span-3 {
    grid-column: span 3 / span 3;
  }
  .sm\:col-span-4 {
    grid-column: span 4 / span 4;
  }
  .sm\:col-span-5 {
    grid-column: span 5 / span 5;
  }
  .sm\:col-span-6 {
    grid-column: span 6 / span 6;
  }
  .sm\:col-span-7 {
    grid-column: span 7 / span 7;
  }
  .sm\:col-span-8 {
    grid-column: span 8 / span 8;
  }
  .sm\:col-span-9 {
    grid-column: span 9 / span 9;
  }
  .sm\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .sm\:grid-cols-10 {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .sm\:grid-cols-11 {
    grid-template-columns: repeat(11, minmax(0, 1fr));
  }
  .sm\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sm\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .sm\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .sm\:grid-cols-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .sm\:grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .sm\:grid-cols-9 {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
  .sm\:grid-cols-none {
    grid-template-columns: none;
  }
  .sm\:flex-row {
    flex-direction: row;
  }
  .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(1rem * var(--tw-space-x-reverse));
    margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
  }
  .sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0px * var(--tw-space-y-reverse));
  }
}
@media (min-width: 768px) {
  .md\:col-span-1 {
    grid-column: span 1 / span 1;
  }
  .md\:col-span-10 {
    grid-column: span 10 / span 10;
  }
  .md\:col-span-11 {
    grid-column: span 11 / span 11;
  }
  .md\:col-span-12 {
    grid-column: span 12 / span 12;
  }
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .md\:col-span-3 {
    grid-column: span 3 / span 3;
  }
  .md\:col-span-4 {
    grid-column: span 4 / span 4;
  }
  .md\:col-span-5 {
    grid-column: span 5 / span 5;
  }
  .md\:col-span-6 {
    grid-column: span 6 / span 6;
  }
  .md\:col-span-7 {
    grid-column: span 7 / span 7;
  }
  .md\:col-span-8 {
    grid-column: span 8 / span 8;
  }
  .md\:col-span-9 {
    grid-column: span 9 / span 9;
  }
  .md\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .md\:grid-cols-10 {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .md\:grid-cols-11 {
    grid-template-columns: repeat(11, minmax(0, 1fr));
  }
  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .md\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .md\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .md\:grid-cols-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .md\:grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .md\:grid-cols-9 {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
  .md\:grid-cols-none {
    grid-template-columns: none;
  }
}
@media (min-width: 1024px) {
  .lg\:col-span-1 {
    grid-column: span 1 / span 1;
  }
  .lg\:col-span-10 {
    grid-column: span 10 / span 10;
  }
  .lg\:col-span-11 {
    grid-column: span 11 / span 11;
  }
  .lg\:col-span-12 {
    grid-column: span 12 / span 12;
  }
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .lg\:col-span-3 {
    grid-column: span 3 / span 3;
  }
  .lg\:col-span-4 {
    grid-column: span 4 / span 4;
  }
  .lg\:col-span-5 {
    grid-column: span 5 / span 5;
  }
  .lg\:col-span-6 {
    grid-column: span 6 / span 6;
  }
  .lg\:col-span-7 {
    grid-column: span 7 / span 7;
  }
  .lg\:col-span-8 {
    grid-column: span 8 / span 8;
  }
  .lg\:col-span-9 {
    grid-column: span 9 / span 9;
  }
  .lg\:max-w-\[200px\] {
    max-width: 200px;
  }
  .lg\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .lg\:grid-cols-10 {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .lg\:grid-cols-11 {
    grid-template-columns: repeat(11, minmax(0, 1fr));
  }
  .lg\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .lg\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .lg\:grid-cols-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .lg\:grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .lg\:grid-cols-9 {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
  .lg\:grid-cols-none {
    grid-template-columns: none;
  }
}
@media (prefers-color-scheme: dark) {
  .dark\:border-red-500 {
    --tw-border-opacity: 1;
    border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
  }
  .dark\:bg-slate-950\/50 {
    background-color: rgb(2 6 23 / 0.5);
  }
  .dark\:bg-white {
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
  }
  .dark\:bg-opacity-10 {
    --tw-bg-opacity: 0.1;
  }
  .dark\:bg-opacity-5 {
    --tw-bg-opacity: 0.05;
  }
  .dark\:text-red-500 {
    --tw-text-opacity: 1;
    color: rgb(239 68 68 / var(--tw-text-opacity, 1));
  }
  .dark\:opacity-25 {
    opacity: 0.25;
  }
  .dark\:ring-opacity-60 {
    --tw-ring-opacity: 0.6;
  }
  .dark\:placeholder\:text-red-500::-moz-placeholder {
    --tw-text-opacity: 1;
    color: rgb(239 68 68 / var(--tw-text-opacity, 1));
  }
  .dark\:placeholder\:text-red-500::placeholder {
    --tw-text-opacity: 1;
    color: rgb(239 68 68 / var(--tw-text-opacity, 1));
  }
  .hover\:dark\:\!bg-gray-100:hover {
    --tw-bg-opacity: 1 !important;
    background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)) !important;
  }
  .hover\:dark\:bg-gray-100:hover {
    --tw-bg-opacity: 1;
    background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
  }
  .dark\:hover\:bg-opacity-20:hover {
    --tw-bg-opacity: 0.2;
  }
}
.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button {
  -webkit-appearance: none;
          appearance: none;
}
.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button {
  -webkit-appearance: none;
          appearance: none;
}
.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar {
  display: none;
}
