.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(22, 163, 74, 0.38);
  border-radius: 999px;
  background: #128c7e;
  color: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28);
  transition: transform 140ms ease, background 140ms ease;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.chat-fab:hover {
  background: #075e54;
  transform: translateY(-1px);
}

.chat-fab:active,
.chat-fab--dragging {
  cursor: grabbing;
}

.chat-fab--dragging {
  transition: none;
}

.chat-fab--dragging:hover {
  transform: none;
}

.chat-fab__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
}

.chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 901;
  display: flex;
  width: min(470px, 100vw);
  height: auto;
  max-height: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px 0 0 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.34);
  animation: chat-slide-in 160ms ease-out;
}

@keyframes chat-slide-in {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-panel__header,
.chat-room-view__header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.18);
  background: #075e54;
  padding: 10px 12px;
}

.chat-panel__header div,
.chat-room-view__title {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chat-panel__header strong,
.chat-room-view__title strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-panel__header span,
.chat-room-view__title span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.chat-panel__error {
  border-bottom: 1px solid #fecdd3;
  background: #fff1f2;
  padding: 7px 10px;
  color: #be123c;
  font-size: 12px;
  font-weight: 600;
}

.chat-panel__search {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #e2e8f0;
  background: #f0f7f4;
  padding: 7px 10px;
  color: #475569;
}

.chat-panel__search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  outline: none;
}

.chat-panel__search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #475569;
}

.chat-search-scope {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #d9ede6;
  background: #f7fbf9;
  padding: 6px 10px;
}

.chat-search-scope__button {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  padding: 0 9px;
}

.chat-search-scope__button--active {
  border-color: #128c7e;
  background: #e7f7f3;
  color: #075e54;
}

.chat-search-scope__button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.chat-icon-button,
.chat-send-button {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
}

.chat-panel__header .chat-icon-button,
.chat-room-view__header .chat-icon-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chat-icon-button:hover {
  background: #f1f5f9;
}

.chat-panel__header .chat-icon-button:hover,
.chat-room-view__header .chat-icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-send-button {
  border-color: #128c7e;
  background: #128c7e;
  color: #fff;
}

.chat-send-button:disabled {
  cursor: not-allowed;
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #94a3b8;
}

.chat-room-list,
.chat-room-view {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.chat-drop-overlay {
  position: absolute;
  inset: 58px 10px 78px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #2563eb;
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.92);
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
}

.chat-room-list__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #d9ede6;
  background: #f7fbf9;
  padding: 8px 10px;
}

.chat-room-list__toolbar button,
.chat-forward__search button,
.chat-forward__save {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #bfe7dc;
  border-radius: 8px;
  background: #e7f7f3;
  color: #075e54;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

.chat-room-list__search {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  padding: 7px 10px;
}

.chat-room-list__search input {
  min-height: 32px;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  outline: none;
}

.chat-room-list__search button {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.chat-user-picker {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 8px;
}

.chat-user-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  color: #0f172a;
  font-size: 12px;
}

.chat-user-picker__header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #475569;
}

.chat-user-picker__group-name {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  outline: none;
  padding: 0 9px;
  margin-bottom: 7px;
}

.chat-user-picker__search {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  padding: 0 8px;
}

.chat-user-picker__search input,
.chat-forward input,
.chat-forward select {
  min-height: 34px;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  outline: none;
}

.chat-user-picker__list {
  max-height: 210px;
  overflow: auto;
  padding-top: 8px;
}

.chat-user-picker__status {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.chat-user-picker__list button,
.chat-room-item {
  content-visibility: auto;
  contain-intrinsic-size: 56px;
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  padding: 8px 10px;
  text-align: left;
}

.chat-user-picker__list button:hover,
.chat-room-item:hover {
  background: #f8fafc;
}

.chat-user-picker__list button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.chat-user-picker__list button input {
  flex: 0 0 auto;
}

.chat-user-picker__create {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #128c7e;
  border-radius: 8px;
  background: #128c7e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin-top: 8px;
}

.chat-user-picker__create:disabled {
  cursor: not-allowed;
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #94a3b8;
}

.chat-user-picker__list span,
.chat-room-item__name {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-user-picker__list small,
.chat-room-item__preview,
.chat-room-item__side small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-list__items {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.chat-room-list__show-more {
  display: flex;
  width: calc(100% - 20px);
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #075e54;
  font-size: 12px;
  font-weight: 800;
  margin: 8px 10px 10px;
}

.chat-room-list__show-more:hover {
  background: #e7f7f3;
  border-color: #bfe7dc;
}

.chat-user-picker__list .chat-user-picker__show-more {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #075e54;
  margin: 8px 0 0;
}

.chat-user-picker__list .chat-user-picker__show-more:hover {
  background: #e7f7f3;
  border-color: #bfe7dc;
}

.chat-search-results {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: #f8fafc;
}

.chat-search-results__list {
  display: flex;
  flex-direction: column;
}

.chat-search-result {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 3px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  padding: 9px 10px;
  text-align: left;
}

.chat-search-result:hover {
  background: #eff6ff;
}

.chat-search-results__more {
  width: calc(100% - 16px);
  min-height: 34px;
  align-self: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  margin: 8px;
}

.chat-search-results__more:hover:not(:disabled) {
  border-color: #60a5fa;
  background: linear-gradient(135deg, #dbeafe 0%, #cffafe 100%);
}

.chat-search-results__more:disabled {
  cursor: wait;
  opacity: 0.72;
}

.chat-search-result__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-search-result__top strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-search-result__top small,
.chat-search-result__author {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.chat-search-result__preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
}

.chat-room-item__main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.chat-room-item__open {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.chat-room-item__side {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex-direction: column;
}

.chat-room-item__side strong {
  min-width: 20px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

.chat-room-pin {
  display: inline-flex;
  width: 24px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
}

.chat-room-pin--active {
  color: #d97706;
}

.chat-room-pin:hover {
  background: #f1f5f9;
}

.chat-online-dot {
  display: inline-flex;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.15);
}

.chat-online-dot--online {
  background: #22c55e;
}

.chat-empty {
  padding: 24px 12px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.chat-message-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(7, 94, 84, 0.055) 25%, transparent 25%) 0 0 / 18px 18px,
    linear-gradient(315deg, rgba(18, 140, 126, 0.045) 25%, transparent 25%) 0 0 / 18px 18px,
    #eef7f3;
  padding: 12px 10px;
}

.chat-jump-latest {
  position: absolute;
  right: 14px;
  bottom: 76px;
  z-index: 4;
  min-height: 30px;
  border: 1px solid #bfe7dc;
  border-radius: 999px;
  background: #fff;
  color: #075e54;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  padding: 0 12px;
}

.chat-jump-latest:hover {
  background: #e7f7f3;
}

.chat-message {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.chat-message--mine {
  justify-content: flex-end;
}

.chat-message__bubble {
  max-width: 82%;
  min-width: 120px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 12px;
  background: #fff;
  padding: 7px 8px;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.chat-message--mine .chat-message__bubble {
  border-color: #bde7bd;
  background: #dcf8c6;
}

.chat-message--pending .chat-message__bubble {
  opacity: 0.82;
}

.chat-message--failed .chat-message__bubble {
  border-color: #fecaca;
  background: #fff1f2;
}

.chat-message--highlighted .chat-message__bubble {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.26), 0 12px 26px rgba(15, 23, 42, 0.13);
}

.chat-message__meta,
.chat-message__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.chat-message__footer {
  min-height: 24px;
}

.chat-message__delivery {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.chat-message__delivery--failed {
  color: #be123c;
}

.chat-message__retry {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 4px;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  background: #fff;
  color: #be123c;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  padding: 0 7px;
}

.chat-message__retry:hover {
  background: #fff1f2;
}

.chat-message__text,
.chat-message__deleted {
  overflow-wrap: anywhere;
  padding: 3px 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.chat-message__deleted {
  color: #64748b;
  font-style: italic;
}

.chat-message__link {
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.chat-message__link:hover {
  color: #1e40af;
}

.chat-message__reply,
.chat-reply-compose {
  border-left: 3px solid #93c5fd;
  border-radius: 7px;
  background: rgba(248, 250, 252, 0.86);
  color: #334155;
}

.chat-message__reply {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
  padding: 5px 7px;
}

.chat-message__reply strong,
.chat-reply-compose strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
}

.chat-message__reply span,
.chat-reply-compose span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  color: #475569;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
}

.chat-attachment {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 5px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 5px;
  text-decoration: none;
}

.chat-attachment__image {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
}

.chat-attachment__icon {
  display: inline-flex;
  width: 40px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.chat-attachment__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.chat-attachment__name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.chat-attachment__body small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.chat-attachment__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chat-attachment__button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
  text-decoration: none;
}

.chat-attachment__blocked {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
}

.chat-attachment--pending {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.72);
}

.chat-receipts,
.chat-message-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.chat-receipts__button,
.chat-message-menu__trigger {
  display: inline-flex;
  min-width: 24px;
  height: 22px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475569;
  font-size: 10px;
}

.chat-receipts__popup,
.chat-message-menu__content {
  position: absolute;
  right: 0;
  bottom: 24px;
  z-index: 3;
  display: flex;
  min-width: 150px;
  flex-direction: column;
  gap: 3px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 7px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

.chat-receipts__popup {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 2000;
  width: 220px;
  max-height: min(220px, calc(100vh - 20px));
  overflow: auto;
}

.chat-message-menu__content button {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  text-align: left;
}

.chat-message-menu__content button:hover {
  background: #f1f5f9;
}

.chat-receipts__reader {
  color: #0f172a;
  font-size: 11px;
}

.chat-typing {
  color: #64748b;
  font-size: 12px;
  font-style: italic;
  padding: 4px 6px;
}

.chat-load-earlier {
  align-self: center;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
}

.chat-load-earlier:hover {
  background: #d1fae5;
}

.chat-file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 6px 10px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

.chat-file-chip__thumb,
.chat-file-chip__icon {
  display: inline-flex;
  width: 34px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #475569;
}

.chat-file-chip__thumb {
  object-fit: cover;
  padding: 0;
}

.chat-file-chip__text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.chat-file-chip__text strong,
.chat-file-chip__text small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-file-chip__text strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.chat-file-chip__text small {
  white-space: nowrap;
}

.chat-file-chip__text small {
  color: #64748b;
  font-size: 10px;
}

.chat-file-chip button {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
}

.chat-reply-compose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  border-left-width: 4px;
  padding: 7px 10px;
}

.chat-reply-compose div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chat-reply-compose button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #475569;
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  border-top: 1px solid #e2e8f0;
  background: #f7fbf9;
  padding: 8px;
}

.chat-input-row textarea {
  min-height: 36px;
  max-height: 120px;
  flex: 1;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  outline: none;
  padding: 8px;
}

.chat-input-row textarea:focus {
  border-color: #128c7e;
  box-shadow: 0 0 0 2px rgba(18, 140, 126, 0.14);
}

.chat-forward {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.28);
  padding: 14px;
}

.chat-forward__dialog {
  display: flex;
  width: 100%;
  max-width: 330px;
  max-height: 92%;
  flex-direction: column;
  gap: 9px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
}

.chat-forward__header,
.chat-forward__search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-forward__header button {
  border: 0;
  background: transparent;
}

.chat-forward label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.chat-forward input,
.chat-forward select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 8px;
}

.chat-forward__results {
  display: flex;
  max-height: 150px;
  flex-direction: column;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.chat-forward__results button {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  padding: 6px 8px;
  text-align: left;
}

.chat-forward__results button:hover {
  background: #f8fafc;
}

.chat-forward__save {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

@media (max-width: 640px) {
  .chat-fab {
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
  }

  .chat-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .chat-icon-button,
  .chat-send-button {
    min-width: 44px;
    height: 44px;
  }

  .chat-input-row textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .chat-room-item,
  .chat-user-picker__list button {
    min-height: 54px;
  }
}

@media (max-width: 480px) {
  .chat-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }
}

