﻿.conversation-window {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 360px;
  height: 480px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  overflow: hidden;
  font-family: inherit;
}
@media (max-width: 576px) {
  .conversation-window {
    width: calc(100% - 20px);
    height: calc(100vh - 120px);
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-height: 600px;
  }
}

.conversation-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8B9E8B 0%, #6B7E6B 100%);
  color: #FFFFFF;
  flex-shrink: 0;
}

.conversation-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

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

.conversation-header-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-header-status {
  font-size: 12px;
  opacity: 0.85;
}

.conversation-header-actions {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.conversation-header-actions button {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}
.conversation-header-actions button:hover {
  background: rgba(255, 255, 255, 0.25);
}
.conversation-header-actions button i {
  font-size: 14px;
}

.conversation-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conversation-loading,
.conversation-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #8D8D8D;
  text-align: center;
}
.conversation-loading i,
.conversation-empty i {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.conversation-loading p,
.conversation-empty p {
  margin: 0;
  font-size: 14px;
}

.conversation-message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}
.conversation-message.own {
  align-self: flex-end;
}
.conversation-message.own .message-bubble {
  background: linear-gradient(135deg, #8B9E8B 0%, #6B7E6B 100%);
  color: #FFFFFF;
  border-radius: 18px 18px 4px 18px;
}
.conversation-message.own .message-time {
  text-align: right;
}
.conversation-message.other {
  align-self: flex-start;
}
.conversation-message.other .message-bubble {
  background: #FFFFFF;
  color: #2C2C2C;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.conversation-message.other .message-time {
  text-align: left;
}

.message-bubble {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.message-time {
  font-size: 11px;
  color: #8D8D8D;
  margin-top: 4px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-read-status {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
}
.message-read-status i {
  font-size: 10px;
}
.message-read-status.sent {
  color: #8D8D8D;
}
.message-read-status.read {
  color: #53bdeb;
}

.conversation-input-area {
  padding: 12px;
  background: #FFFFFF;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.conversation-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #f5f5f5;
  border-radius: 24px;
  padding: 8px 8px 8px 16px;
}

#conv-input {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-size: 14px;
  line-height: 1.4;
  max-height: 100px;
  min-height: 20px;
  outline: none;
  font-family: inherit;
}
#conv-input::placeholder {
  color: #8D8D8D;
}

.btn-conversation-send {
  width: 36px;
  height: 36px;
  border: none;
  background: linear-gradient(135deg, #8B9E8B 0%, #6B7E6B 100%);
  color: #FFFFFF;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.btn-conversation-send:hover {
  transform: scale(1.05);
}
.btn-conversation-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-conversation-send i {
  font-size: 14px;
}

.conversation-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B9E8B 0%, #6B7E6B 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  transition: transform 0.2s, box-shadow 0.2s;
}
.conversation-bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
@media (max-width: 576px) {
  .conversation-bubble {
    bottom: 10px;
    right: 10px;
  }
}

.conversation-bubble-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 18px;
}

.conversation-bubble-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #dc3545;
  color: #FFFFFF;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
}

.btn-provider-message,
.btn-client-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: #8B9E8B;
  border: 1px solid #8B9E8B;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-provider-message:hover,
.btn-client-message:hover {
  background: #8B9E8B;
  color: #FFFFFF;
}
.btn-provider-message i,
.btn-client-message i {
  font-size: 14px;
}

.message-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #dc3545;
  color: #FFFFFF;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}

.message-nav-badge {
  position: absolute;
  top: 2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #dc3545;
  color: #FFFFFF;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
}

.message-center-dropdown .nav-link {
  padding: 0.5rem 0.75rem;
}

.message-center-panel {
  width: 360px;
  max-width: calc(100vw - 20px);
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
@media (max-width: 576px) {
  .message-center-panel {
    width: calc(100vw - 20px);
    right: 10px !important;
    left: 10px !important;
  }
}

.message-center-header {
  padding: 12px 16px;
  background: linear-gradient(135deg, #8B9E8B 0%, #6B7E6B 100%);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.message-center-header h6 {
  font-weight: 600;
  margin: 0;
}

.message-center-body {
  max-height: 400px;
  overflow-y: auto;
  background: #f8f9fa;
}

.message-center-footer {
  padding: 8px 16px;
  background: #FFFFFF;
  border-top: 1px solid #eee;
  text-align: center;
}

.message-center-loading,
.message-center-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #8D8D8D;
  text-align: center;
  gap: 8px;
}
.message-center-loading i,
.message-center-empty i {
  font-size: 24px;
  opacity: 0.5;
}
.message-center-loading span,
.message-center-empty span {
  font-size: 13px;
}

.conversation-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.15s;
  gap: 12px;
}
.conversation-item:hover {
  background: #f5f5f5;
}
.conversation-item:last-child {
  border-bottom: none;
}
.conversation-item.unread {
  background: rgba(139, 158, 139, 0.08);
}
.conversation-item.unread .conversation-item-name {
  font-weight: 600;
}
.conversation-item.unread .conversation-item-preview {
  color: #2C2C2C;
  font-weight: 500;
}

.conversation-item-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B9E8B 0%, #6B7E6B 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.conversation-item-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.conversation-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.conversation-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #2C2C2C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-item-time {
  font-size: 11px;
  color: #8D8D8D;
  white-space: nowrap;
  margin-left: 8px;
}

.conversation-item-preview {
  font-size: 13px;
  color: #8D8D8D;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-item-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #8B9E8B;
  color: #FFFFFF;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}
