/**
 * OmniCRM Accessible Modal Dialogs
 * Backdrop, modal box, and action dialog styling.
 */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open,
.modal-backdrop[aria-hidden="false"] {
  display: flex;
  opacity: 1;
}

.modal-box {
  background: var(--card-bg, #0f172a);
  border: 1px solid var(--card-border, #1e293b);
  border-radius: var(--radius-lg, 14px);
  max-width: 540px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-box,
.modal-backdrop[aria-hidden="false"] .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border, #1e293b);
}

.modal-title {
  color: var(--text-bright, #ffffff);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--text-bright, #ffffff);
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  font-size: 13px;
  color: var(--text, #e2e8f0);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
