/* Communication Interface Styles */
.accent-custom.communication-view .content-wrapper {
  height: calc(100vh - calc(3.5rem + 1px) - calc(3.5rem + 1px));
  overflow: hidden;
}

.accent-custom.communication-view .content-wrapper > .communication-page {
  height: 100%;
  min-height: 0;
}

.accent-custom .communication-page {
  display: flex;
  flex-direction: column;
}

.accent-custom .communication-page .content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.accent-custom .communication-page .content > .container-fluid {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.accent-custom .communication-layout {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  flex: 1;
}

.accent-custom .communication-sidebar,
.accent-custom .communication-main {
  height: 100%;
  min-height: 0;
}

.accent-custom .communication-sidebar .card,
.accent-custom .communication-main .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Chat Search */
.accent-custom .chat-search-wrapper {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.accent-custom .chat-search {
  border-radius: 20px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.accent-custom .chat-search:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Chat List */
.accent-custom .chat-list {
  flex: 1;
  overflow-y: auto;
  max-height: none;
  min-height: 0;
}

.accent-custom .communication-sidebar .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.accent-custom .chat-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.accent-custom .chat-item:hover {
  background-color: #f9fafb;
}

.accent-custom .chat-item.active {
  background-color: #eff6ff;
  border-right: 3px solid #0ea5e9;
}

.accent-custom .chat-avatar {
  position: relative;
  margin-right: 12px;
}

.accent-custom .avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.accent-custom .avatar-circle.small {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.accent-custom .online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border: 2px solid white;
  border-radius: 50%;
}

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

.accent-custom .chat-name {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  margin-bottom: 2px;
}

.accent-custom .chat-preview {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accent-custom .chat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.accent-custom .chat-time {
  font-size: 11px;
  color: #9ca3af;
}

.accent-custom .unread-badge {
  background-color: #ef4444;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}
/* Chat Header */
.accent-custom .chat-header {
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
  padding: 16px 20px;
}

.accent-custom .typing-indicator {
  margin-top: 2px;
}

/* Messages Area */
.accent-custom .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  background-color: #f8fafc;
  min-height: 0;
}

.accent-custom .messages-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accent-custom .message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.accent-custom .message.own-message {
  justify-content: flex-end;
}

.accent-custom .message.other-message {
  justify-content: flex-start;
}

.accent-custom .message-avatar {
  margin-bottom: 4px;
}

.accent-custom .message-content {
  max-width: 70%;
  display: flex;
  flex-direction: column;
}

.accent-custom .message.own-message .message-content {
  align-items: flex-end;
}

.accent-custom .message.other-message .message-content {
  align-items: flex-start;
}

.accent-custom .message-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.accent-custom .message.own-message .message-bubble {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  color: white;
  border-bottom-right-radius: 6px;
}

.accent-custom .message.other-message .message-bubble {
  background-color: white;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 6px;
}

.accent-custom .message-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  padding: 0 4px;
}

/* Chat Input */
.accent-custom .chat-input {
  border-top: 1px solid #e5e7eb;
  background-color: white;
  padding: 16px 20px;
}

.accent-custom .chat-input .input-group {
  border-radius: 25px;
  overflow: hidden;
  border: 1px solid #d1d5db;
}

.accent-custom .chat-input .form-control {
  border: none;
  padding: 12px 16px;
  font-size: 14px;
}

.accent-custom .chat-input .form-control:focus {
  box-shadow: none;
  border-color: transparent;
}

.accent-custom .chat-input .btn {
  border: none;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  border-radius: 0;
}

.accent-custom .chat-input .btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
}

.accent-custom .chat-input .btn:disabled {
  background: #9ca3af;
  opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 991px) {
  .accent-custom .communication-layout {
    height: auto;
    min-height: 500px;
    overflow: visible;
  }

  .accent-custom.communication-view .content-wrapper {
    height: auto;
    overflow: visible;
  }
  
  .accent-custom .communication-sidebar {
    margin-bottom: 20px;
  }
  
  .accent-custom .communication-sidebar .card {
    height: 300px;
  }
  
  .accent-custom .communication-main .card {
    height: 500px;
  }
  
  .accent-custom .chat-list {
    max-height: 200px;
  }
}

@media (max-width: 768px) {
  .accent-custom .message-content {
    max-width: 85%;
  }
  
  .accent-custom .chat-item {
    padding: 10px 12px;
  }
  
  .accent-custom .avatar-circle {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .accent-custom .chat-search-wrapper {
    padding: 12px;
  }
  
  .accent-custom .chat-header {
    padding: 12px 16px;
  }
  
  .accent-custom .chat-input {
    padding: 12px 16px;
  }
}

/* Scrollbar Styling */
.accent-custom .chat-list::-webkit-scrollbar,
.accent-custom .chat-messages::-webkit-scrollbar {
  width: 6px;
}

.accent-custom .chat-list::-webkit-scrollbar-track,
.accent-custom .chat-messages::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.accent-custom .chat-list::-webkit-scrollbar-thumb,
.accent-custom .chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.accent-custom .chat-list::-webkit-scrollbar-thumb:hover,
.accent-custom .chat-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
/* Button gap utility */
.accent-custom .d-flex.gap-2 > * + * {
  margin-left: 8px;
}

/* Chat statistics button */
.accent-custom .btn-outline-info {
  border-color: #17a2b8;
  color: #17a2b8;
}

.accent-custom .btn-outline-info:hover {
  background-color: #17a2b8;
  color: white;
}

/* Improved message timestamp */
.accent-custom .message-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  padding: 0 4px;
  white-space: nowrap;
}

/* Better error state */
.accent-custom .communication-error {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.accent-custom .communication-error i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}