/* CRM-style alert/confirm dialogs — shared across CRM, agent portal, embeds */

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

@keyframes customModalScaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: customModalFadeIn 0.2s ease;
}

.custom-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.custom-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  animation: customModalScaleIn 0.3s ease;
  border: 1px solid #e5e7eb;
}

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

.custom-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  font-family: 'Lora', 'Cormorant Garamond', Georgia, serif;
}

.custom-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 20px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.custom-modal-close:hover {
  background: #e5e7eb;
  color: #000;
}

.custom-modal-body {
  padding: 20px 24px;
}

.custom-modal-body p {
  margin: 0;
  font-size: 15px;
  color: #374151;
  line-height: 1.5;
}

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

.custom-modal-btn {
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.custom-modal-btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.custom-modal-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.custom-modal-btn-primary {
  background: #000;
  color: #fff;
  border-color: #000;
}

.custom-modal-btn-primary:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.custom-modal-btn-primary:focus,
.custom-modal-btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.custom-modal.is-busy .custom-modal-close {
  display: none;
}

.custom-modal.is-busy .custom-modal-overlay {
  pointer-events: none;
}
