/* Custom Modal & Toast Styles - DKX Cameras NVR */
:root {
  --modal-bg: rgba(26, 34, 52, 0.95);
  --modal-border: rgba(99, 102, 241, 0.25);
  --modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.15);
  --toast-bg: rgba(17, 24, 39, 0.95);
}

/* Modal Overlay Backdrop */
.nvr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
}

.nvr-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Dialog Box */
.nvr-modal-dialog {
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--modal-shadow);
  overflow: hidden;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f3f4f6;
  font-family: inherit;
}

.nvr-modal-backdrop.active .nvr-modal-dialog {
  transform: scale(1) translateY(0);
}

.nvr-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 12px;
}

.nvr-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nvr-modal-icon.info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.nvr-modal-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.nvr-modal-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.nvr-modal-icon.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.nvr-modal-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f9fafb;
  margin: 0;
}

.nvr-modal-body {
  padding: 8px 24px 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #9ca3af;
}

.nvr-modal-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(100, 116, 139, 0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nvr-modal-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.nvr-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nvr-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.nvr-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nvr-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.nvr-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nvr-btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.nvr-btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.nvr-btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45);
}

/* Toast Container & Notification Cards */
.nvr-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 48px);
}

.nvr-toast {
  pointer-events: auto;
  background: var(--toast-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.nvr-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.nvr-toast.toast-success {
  border-left: 4px solid #10b981;
}

.nvr-toast.toast-error {
  border-left: 4px solid #ef4444;
}

.nvr-toast.toast-warning {
  border-left: 4px solid #f59e0b;
}

.nvr-toast.toast-info {
  border-left: 4px solid #3b82f6;
}

.nvr-toast-icon {
  flex-shrink: 0;
  display: flex;
}

.nvr-toast-msg {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

.nvr-toast-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
}

.nvr-toast-close:hover {
  color: #fff;
}
