/**
 * Conversation Delete Styles
 * Styles for conversation menu and delete modal
 * 
 * @version 2.1.0
 */

/* ============================================
   CONVERSATION MENU BUTTON
   ============================================ */
.conversation-menu-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 1; /* Always visible */
  z-index: 100;
  flex-shrink: 0;
  margin-left: 4px;
  position: relative;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}

.conversation-menu-btn i {
  font-size: 14px;
  line-height: 1;
}

[dir="rtl"] .conversation-menu-btn {
  margin-left: 0;
  margin-right: 4px;
}

.conversation-menu-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.conversation-menu-btn:active {
  background: #e5e7eb;
}

/* Prevent conversation item click when clicking menu button */
.uc-sidebar-conversation-item {
  position: relative;
}

/* ============================================
   CONVERSATION MENU DROPDOWN
   ============================================ */
.conversation-menu {
  position: fixed;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 4px;
  z-index: 10000;
  animation: menuFadeIn 0.15s ease-out;
  min-width: 120px;
  max-width: 160px;
}

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

.conversation-menu-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
}

.conversation-menu-option:hover {
  background: #f3f4f6;
}

.conversation-delete-option {
  color: #ef4444;
}

.conversation-delete-option:hover {
  background: #fef2f2;
}

.conversation-menu-option i {
  width: 14px;
  text-align: center;
  font-size: 13px;
}

/* ============================================
   DELETE MODAL
   ============================================ */
.conversation-delete-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.conversation-delete-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.conversation-delete-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.conversation-delete-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.conversation-delete-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.conversation-delete-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.conversation-delete-modal-body {
  padding: 24px;
}

.conversation-delete-warning {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-bottom: 20px;
}

.conversation-delete-warning i {
  color: #ef4444;
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.conversation-delete-warning p {
  margin: 0;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.5;
}

.conversation-delete-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conversation-delete-form label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.conversation-delete-password {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.conversation-delete-password:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.conversation-delete-error {
  color: #ef4444;
  font-size: 14px;
  margin-top: 8px;
}

.conversation-delete-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
}

.conversation-delete-modal-footer .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.conversation-delete-modal-footer .btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.conversation-delete-modal-footer .btn-secondary:hover {
  background: #e5e7eb;
}

.conversation-delete-modal-footer .btn-danger {
  background: #ef4444;
  color: white;
}

.conversation-delete-modal-footer .btn-danger:hover {
  background: #dc2626;
}

.conversation-delete-modal-footer .btn-danger:disabled {
  background: #fca5a5;
  cursor: not-allowed;
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] .conversation-menu {
  text-align: right;
}

[dir="rtl"] .conversation-menu-option {
  flex-direction: row-reverse;
}

[dir="rtl"] .conversation-delete-warning {
  flex-direction: row-reverse;
}

[dir="rtl"] .conversation-delete-modal-footer {
  flex-direction: row-reverse;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .conversation-delete-modal-content {
    width: 95%;
    margin: 16px;
  }

  .conversation-delete-modal-header,
  .conversation-delete-modal-body,
  .conversation-delete-modal-footer {
    padding: 16px;
  }

  .conversation-delete-modal-footer {
    flex-direction: column;
  }

  .conversation-delete-modal-footer .btn {
    width: 100%;
  }
}


/* ============================================
   PIPELINE CARD MENU BUTTON POSITIONING
   ============================================ */
.wc-pipeline-card-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.wc-pipeline-card .conversation-menu-btn {
  position: static;
  margin-left: auto;
}

[dir="rtl"] .wc-pipeline-card .conversation-menu-btn {
  margin-left: 0;
  margin-right: auto;
}

.wc-pipeline-card:hover .conversation-menu-btn {
  opacity: 1;
}


/* ============================================
   USER CONVERSATIONS CARD MENU BUTTON
   ============================================ */
.uc-pipeline-card-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.uc-pipeline-card .conversation-menu-btn {
  position: static;
  margin-left: auto;
}

[dir="rtl"] .uc-pipeline-card .conversation-menu-btn {
  margin-left: 0;
  margin-right: auto;
}

.uc-pipeline-card:hover .conversation-menu-btn {
  opacity: 1;
}


/* ============================================
   SIDEBAR CONVERSATION HEADER
   ============================================ */
.uc-sidebar-conversation-name {
  flex: 1;
  min-width: 0;
}

.uc-sidebar-conversation-time {
  flex-shrink: 0;
}
