/* WhatsApp View - Non-color styles */
.whatsapp-view .whatsapp-layout {
  display: flex;
  flex-direction: row;
  min-height: 80vh;
}

.whatsapp-view .card {
  border: none;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: none !important;
}

.whatsapp-view .card-body {
  background: transparent;
}

.whatsapp-view .whatsapp-sidebar {
  width: 40%;
  min-width: 500px;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

/* .whatsapp-view .sidebar-header {
  padding: 1.25rem 1.25rem 0.75rem;
}

.whatsapp-view .sidebar-header-compact {
  padding: 1.5rem 1.25rem 1rem;
  border-top-left-radius: 12px;
} */

.whatsapp-view .sidebar-header-compact {
  min-height: 64px;
  padding: 12px 16px !important;
  display: flex;
  align-items: center;
}

.whatsapp-view .sidebar-controls {
  padding: 0 1.25rem 1rem;
}

.whatsapp-view .clients-list {
  flex: 1;
  overflow-y: auto;
}

.whatsapp-view .client-item {
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.whatsapp-view .client-item.active {
  border-right-width: 4px;
}

.whatsapp-view .client-item.status-pending {
  border-left-width: 3px;
}

.whatsapp-view .client-item.status-active {
  border-left-width: 3px;
}

.whatsapp-view .client-item.status-urgent {
  border-left-width: 3px;
}

.whatsapp-view .client-item.status-completed {
  border-left-width: 3px;
}

.whatsapp-view .client-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.whatsapp-view .client-name {
  font-weight: 600;
}

.whatsapp-view .client-phone {
  font-size: 0.85rem;
}

.whatsapp-view .client-snippet {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.3;
}

.whatsapp-view .client-time {
  font-size: 0.75rem;
}

.whatsapp-view .delete-client {
  font-size: 0.85rem;
}

.whatsapp-view .whatsapp-conversation {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* border-top-right-radius: 12px;
  border-bottom-right-radius: 12px; */
  box-shadow: none !important;
}

.whatsapp-view .conversation-header {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.whatsapp-view .conversation-header h5 {
  margin-bottom: 0.25rem;
}

/* Chat Header Styles */
.whatsapp-view .chat-header {
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.whatsapp-view .chat-header .client-avatar i {
  display: block;
}

.whatsapp-view .chat-header h6 {
  font-weight: 600;
  margin: 0;
}

.whatsapp-view .chat-header small {
  font-size: 0.85rem;
}

.whatsapp-view .chat-header .btn {
  transition: all 0.2s ease;
}

.whatsapp-view .chat-header .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.whatsapp-view .conversation-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  height: 100%;
}

.whatsapp-view .message-row {
  display: flex;
  width: 100%;
  margin-bottom: 0.2rem;
}

.whatsapp-view .message-row.inbound {
  justify-content: flex-start;
}

.whatsapp-view .message-row.outbound {
  justify-content: flex-end;
}

.whatsapp-view .message-bubble {
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  max-width: 70%;
  box-shadow: 0 4px 12px rgba(12, 37, 96, 0.08);
}

/* WhatsApp Reactions */
.whatsapp-view .message-reactions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.whatsapp-view .reaction-emoji {
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  display: inline-block;
  cursor: default;
  transition: transform 0.15s ease;
}

.whatsapp-view .reaction-emoji:hover {
  transform: scale(1.15);
}

.whatsapp-view .message-bubble.rag-generated {
  border-left-width: 4px;
  border-left-style: solid;
}

.whatsapp-view .message-row.outbound .message-bubble.rag-generated {
  border-left-width: 4px;
  border-left-style: solid;
}

.whatsapp-view .message-content-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  justify-content: space-between;
}

.whatsapp-view .message-text {
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  line-height: 1.3;
  font-size: 0.9rem;
}

/* Texto original (no español) en cursiva */
.whatsapp-view .message-text.original {
  font-style: italic;
  opacity: 0.95;
}

/* Texto traducido (español) en estilo normal */
.whatsapp-view .message-text.translated {
  font-style: normal;
  opacity: 1;
}

.whatsapp-view .message-meta-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.whatsapp-view .message-meta-inline .timestamp {
  font-size: 0.65rem;
  opacity: 0.7;
  white-space: nowrap;
}

.whatsapp-view .message-meta-inline .badge {
  font-size: 0.6rem;
  padding: 0.15rem 0.35rem;
}

.whatsapp-view .message-meta-inline .translate-btn {
  font-size: 0.75rem;
  padding: 0.1rem 0.25rem;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s;
  text-decoration: none;
  line-height: 1;
}

.whatsapp-view .message-meta-inline .translate-btn:hover {
  opacity: 1;
}

.whatsapp-view .message-meta-inline .translate-btn.active {
  opacity: 1;
  color: #0d6efd;
}

.whatsapp-view .message-row.outbound .translate-btn.active {
  color: #fff;
  text-shadow: 0 0 3px rgba(255,255,255,0.5);
}

.whatsapp-view .summary-card {
  margin: 0.5rem 0;
  padding: 0.9rem 1rem;
  border-left-width: 4px;
  border-left-style: solid;
  border-radius: 12px;
}

.whatsapp-view .summary-card h6 {
  font-size: 0.9rem;
  font-weight: 600;
}

.whatsapp-view .summary-card .summary-actions button {
  margin-right: 0.5rem;
}

/* Client Groups (Active/Archived) */
.whatsapp-view .client-group {
  margin-bottom: 0.5rem;
}

.whatsapp-view .client-group-header {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  user-select: none;
}

.whatsapp-view .client-group-header:hover {
  opacity: 0.8;
}

.whatsapp-view .client-group-header i.bi-chevron-down {
  transition: transform 0.2s ease;
}

.whatsapp-view .client-group-header[aria-expanded="true"] i.bi-chevron-down {
  transform: rotate(180deg);
}

/* Response Status Indicators */
.whatsapp-view .client-item-micro.client-waiting {
  border-left-width: 3px;
  border-left-style: solid;
}

.whatsapp-view .client-item-micro.we-waiting {
  border-left-width: 3px;
  border-left-style: solid;
}

/* PMS Drawer - Structural styles */
.pms-drawer {
  position: absolute;
  top: 0;
  right: -800px;
  width: 800px;
  height: 100%;
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.pms-drawer.open {
  right: 0;
}

.pms-drawer-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pms-drawer-header .btn-link {
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.pms-drawer-header .btn-link:hover {
  opacity: 1;
}

.pms-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.whatsapp-view .whatsapp-conversation {
  position: relative;
  overflow: hidden;
}

.pms-action-card {
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pms-action-card:hover {
  transform: translateY(-2px);
}

.pms-action-card i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
  .whatsapp-view .whatsapp-layout {
    flex-direction: column;
  }
  .whatsapp-view .whatsapp-sidebar {
    width: 100%;
    max-width: none;
    border-right: none;
    min-height: 320px;
  }
}
