/* ============================================
   Общие стили чата (используется в artists/ и admin/)
   Унифицированный дизайн сообщений, вложений, drag&drop
   ============================================ */

/* Базовый layout чата */
.chat-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 80px);
  background: var(--bg-dark, #0a0a0a);
  border-radius: 12px;
  overflow: hidden;
}

.chat-sidebar {
  background: var(--bg-card, #141414);
  border-right: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark, #0a0a0a);
  overflow: hidden;
  min-width: 0;
}

.chat-search {
  padding: 12px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
}

.chat-search input {
  width: 100%;
  background: var(--bg-input, #1a1a1a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary, #fff);
  font-size: 14px;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.04));
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-item:hover {
  background: var(--bg-card-hover, #1c1c1c);
}

.chat-item.active {
  background: rgba(0, 176, 185, 0.1);
  border-left: 3px solid var(--primary, #00b0b9);
}

.chat-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.chat-item-name {
  font-weight: 600;
  color: var(--text-primary, #fff);
  font-size: 14px;
  margin-bottom: 2px;
}

.chat-item-preview {
  font-size: 12px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-badge {
  background: var(--primary, #00b0b9);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card, #141414);
}

.chat-header h3 {
  margin: 0;
  color: var(--text-primary, #fff);
  font-size: 16px;
  font-weight: 600;
}

.chat-back-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary, #fff);
  cursor: pointer;
  padding: 6px;
}

/* Сообщения */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: 100%;
  min-width: 60px;
  padding: 10px 14px;
  border-radius: 14px;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 14px;
  line-height: 1.5;
  animation: chat-msg-in 0.2s ease;
}

@keyframes chat-msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-msg.sent {
  background: var(--primary, #00b0b9);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.received {
  background: var(--bg-card, #1c1c1c);
  color: var(--text-primary, #fff);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-bottom-left-radius: 4px;
}

.chat-msg-operator {
  font-size: 11px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin-bottom: 4px;
  font-weight: 500;
}

.chat-msg-text {
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.7;
}

.chat-msg-time {
  font-size: 11px;
}

.chat-msg-status {
  font-size: 10px;
}

/* Attachments в сообщениях */
.chat-msg-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.chat-msg-image {
  display: block;
  max-width: 280px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.chat-msg-image img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.chat-msg-image img:hover {
  transform: scale(1.02);
}

.chat-msg-video {
  max-width: 280px;
  width: 100%;
  border-radius: 8px;
  background: #000;
}

.chat-msg-audio {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 45px;
  border-radius: 8px;
}

.chat-msg-audio::-webkit-media-controls-panel {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.chat-msg-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  max-width: 300px;
}

.chat-msg-file:hover {
  background: rgba(0, 0, 0, 0.25);
}

.chat-msg.sent .chat-msg-file {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.chat-msg.sent .chat-msg-file:hover {
  background: rgba(255, 255, 255, 0.25);
}

.chat-msg-file-icon {
  font-size: 24px;
  flex-shrink: 0;
}

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

.chat-msg-file-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-msg-file-size {
  font-size: 11px;
  opacity: 0.7;
}

/* Input area */
.chat-input-area {
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-card, #141414);
  padding: 12px 16px;
  position: relative;
}

.chat-input-area.chat-drop-active::before {
  content: '📎 Перетащите файлы сюда';
  position: absolute;
  inset: 0;
  background: rgba(0, 176, 185, 0.1);
  border: 2px dashed var(--primary, #00b0b9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary, #00b0b9);
  pointer-events: none;
}

.chat-attach-preview {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border, rgba(255, 255, 255, 0.07));
}

.chat-attach-preview.has-files {
  display: flex;
}

.chat-attach-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  background: var(--bg-input, #1a1a1a);
  border-radius: 8px;
  max-width: 240px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
}

.chat-attach-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.chat-attach-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-dark, #0a0a0a);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

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

.chat-attach-name {
  font-size: 12px;
  color: var(--text-primary, #fff);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-attach-meta {
  font-size: 10px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.chat-attach-remove {
  background: rgba(255, 71, 87, 0.15);
  border: none;
  color: var(--danger, #ff4757);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.chat-attach-remove:hover {
  background: var(--danger, #ff4757);
  color: #fff;
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-attach-btn,
.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-input, #1a1a1a);
  color: var(--text-primary, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.chat-attach-btn:hover {
  background: var(--primary, #00b0b9);
  border-color: var(--primary, #00b0b9);
}

.chat-send-btn {
  background: var(--primary, #00b0b9);
  border-color: var(--primary, #00b0b9);
}

.chat-send-btn:hover {
  background: var(--primary-dark, #008c93);
}

.chat-send-btn:disabled {
  cursor: not-allowed;
}

.chat-input {
  flex: 1;
  background: var(--bg-input, #1a1a1a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.4;
}

.chat-input:focus {
  border-color: var(--primary, #00b0b9);
}

/* Typing indicator */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px 0;
  font-size: 12px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary, rgba(255, 255, 255, 0.6));
  animation: chat-typing 1.4s infinite;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chat-typing {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.chat-typing-text {
  margin-left: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .chat-container {
    grid-template-columns: 1fr;
  }
  .chat-sidebar {
    position: absolute;
    inset: 0;
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .chat-sidebar.show {
    transform: translateX(0);
  }
  .chat-back-btn {
    display: inline-flex;
  }
  .chat-msg {
    max-width: 85%;
  }
  .chat-msg-image,
  .chat-msg-video {
    max-width: 100%;
  }
}

/* Устаревшие .chat-message классы — теперь используют .chat-msg */
.chat-message {
  display: none;
}

/* Совместимость с admin-chat-* (admin/css) */
.admin-chat-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 80px);
  background: var(--bg-dark, #0a0a0a);
  border-radius: 12px;
  overflow: hidden;
}

.admin-chat-sidebar {
  background: var(--bg-card, #141414);
  border-right: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-chat-list {
  flex: 1;
  overflow-y: auto;
}

.admin-chat-search {
  padding: 12px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
}

.admin-chat-search input {
  width: 100%;
  background: var(--bg-input, #1a1a1a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary, #fff);
  font-size: 14px;
}

.admin-chat-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark, #0a0a0a);
  overflow: hidden;
  min-width: 0;
}

.admin-chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-card, #141414);
  color: var(--text-primary, #fff);
}

.admin-chat-header h3 {
  margin: 0;
  color: var(--text-primary, #fff);
  font-size: 16px;
  font-weight: 600;
}

.admin-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 14px;
  position: relative;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.5;
}

.admin-chat-msg.sent {
  align-self: flex-end;
  background: var(--primary, #00b0b9);
  color: #fff;
}

.admin-chat-msg.received {
  align-self: flex-start;
  background: var(--bg-card, #1c1c1c);
  color: var(--text-primary, #fff);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
}

.admin-chat-msg-operator {
  font-size: 11px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin-bottom: 4px;
  font-weight: 500;
}

.admin-chat-msg-text {
  word-break: break-word;
  white-space: pre-wrap;
}

.admin-chat-msg-time {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.7;
  text-align: right;
}

.admin-chat-input-area {
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-card, #141414);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.admin-chat-input {
  flex: 1;
  background: var(--bg-input, #1a1a1a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.admin-chat-input:focus {
  border-color: var(--primary, #00b0b9);
}

/* Список чатов (sidebar) */
.chat-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.04));
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-conv-item:hover {
  background: var(--bg-card-hover, #1c1c1c);
}

.chat-conv-item.active {
  background: rgba(0, 176, 185, 0.1);
  border-left: 3px solid var(--primary, #00b0b9);
}

.chat-conv-item.unread {
  font-weight: 600;
}

.chat-conv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-input, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.chat-conv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.chat-conv-name {
  font-size: 14px;
  color: var(--text-primary, #fff);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-preview {
  font-size: 12px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-badge {
  background: var(--primary, #00b0b9);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* ============================================
   Date dividers
   ============================================ */
.chat-date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 8px;
  position: relative;
}

.chat-date-divider::before,
.chat-date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, rgba(255, 255, 255, 0.07));
}

.chat-date-divider span {
  font-size: 11px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  padding: 0 12px;
  white-space: nowrap;
}

/* ============================================
   Skeleton loading
   ============================================ */
.chat-loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.chat-skeleton-msg {
  max-width: 60%;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--bg-card, #1c1c1c);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.chat-skeleton-msg.sent {
  align-self: flex-end;
  background: rgba(0, 176, 185, 0.15);
}

.chat-skeleton-msg.received {
  align-self: flex-start;
  background: var(--bg-card, #1c1c1c);
}

.chat-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--border, rgba(255, 255, 255, 0.05)) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    var(--border, rgba(255, 255, 255, 0.05)) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* ============================================
   Empty state
   ============================================ */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.chat-empty-icon {
  margin-bottom: 16px;
  opacity: 0.6;
}

.chat-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0 0 8px;
}

.chat-empty-text {
  font-size: 14px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin: 0;
}

/* ============================================
   Quick replies — dropdown toggle
   ============================================ */
.chat-quick-replies-wrap {
  position: relative;
}

.chat-quick-toggle {
  background: none;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.chat-quick-toggle:hover,
.chat-quick-toggle[aria-expanded='true'] {
  background: var(--primary, #00b0b9);
  color: #fff;
  border-color: var(--primary, #00b0b9);
}

.chat-quick-replies {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card, #1c1c1c);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  border-radius: 12px;
  margin-bottom: 8px;
  animation: chat-msg-in 0.15s ease;
}

.chat-quick-reply-btn {
  background: var(--bg-input, #1a1a1a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chat-quick-reply-btn:hover {
  background: var(--primary, #00b0b9);
  border-color: var(--primary, #00b0b9);
  color: #fff;
}

/* ============================================
   Message row layout + action buttons (beside message)
   ============================================ */
.chat-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 0;
  max-width: 80%;
  position: relative;
  animation: chat-msg-in 0.2s ease;
}

.chat-msg-row.row-sent {
  align-self: flex-end;
  flex-direction: row;
  padding-right: 0;
}

.chat-msg-row.row-received {
  align-self: flex-start;
  flex-direction: row;
  padding-left: 0;
}

.chat-msg-row .chat-msg {
  animation: none;
  flex-shrink: 0;
}

.chat-msg-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
  align-items: center;
  flex-shrink: 0;
  padding-bottom: 4px;
  position: absolute;
  top: 0;
  pointer-events: none;
}

.chat-msg-row.row-sent .chat-msg-actions {
  right: 100%;
  margin-right: 6px;
}

.chat-msg-row.row-received .chat-msg-actions {
  left: 100%;
  margin-left: 6px;
}

.chat-msg-row:hover .chat-msg-actions,
.chat-msg-actions:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.chat-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.chat-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #fff);
}

.chat-action-delete:hover {
  background: var(--danger, #ff4757);
  color: #fff;
}

.chat-action-copy.copied {
  color: var(--primary, #00b0b9);
  background: rgba(0, 176, 185, 0.15);
}

/* ============================================
   Chat header status (online/offline)
   ============================================ */
.chat-header-info {
  display: flex;
  flex-direction: column;
}

.chat-header-status {
  font-size: 12px;
  transition: color 0.3s ease;
}

.chat-header-status.online {
  color: #2ecc71;
}

.chat-header-status.offline {
  color: var(--text-secondary, rgba(255, 255, 255, 0.4));
}

/* ============================================
   Sidebar header
   ============================================ */
.chat-sidebar-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-card, #141414);
}

.chat-sidebar-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

/* ============================================
   Nav badge (unread counter in sidebar nav)
   ============================================ */
.nav-badge {
  background: var(--primary, #00b0b9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

/* ============================================
   Accessibility focus styles
   ============================================ */
.chat-conv-item:focus-visible,
.chat-send-btn:focus-visible,
.chat-attach-btn:focus-visible,
.chat-quick-reply-btn:focus-visible,
.chat-quick-toggle:focus-visible,
.chat-action-btn:focus-visible,
.chat-back-btn:focus-visible {
  outline: 2px solid var(--primary, #00b0b9);
  outline-offset: 2px;
}

.chat-input:focus-visible {
  outline: none;
  border-color: var(--primary, #00b0b9);
  box-shadow: 0 0 0 2px rgba(0, 176, 185, 0.2);
}

/* ============================================
   Responsive improvements
   ============================================ */
@media (max-width: 768px) {
  .chat-sidebar-header {
    padding: 12px 14px;
  }

  .chat-msg-actions {
    opacity: 1;
  }

  .chat-action-btn {
    width: 32px;
    height: 32px;
  }

  .chat-empty-state {
    padding: 40px 16px;
  }

  .chat-msg-row {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .chat-input-row {
    gap: 6px;
  }

  .chat-attach-btn,
  .chat-send-btn {
    width: 36px;
    height: 36px;
  }

  .chat-input {
    padding: 8px 12px;
    font-size: 13px;
  }
}
