/* ============================================================================================
   INVESTOR COMPASS - MODALS & POP-UP DIALOG NOTIFICATIONS
   Master KB Index: KB/_master_kb.md | Style Guide: .agents/AGENTS.md §2 (B2B SaaS Aesthetic, Zero Emojis)
   ============================================================================================ */

/* Dialog Backdrop Overlay */
.app-dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-dialog-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Dialog Box Container */
.app-dialog-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(6px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Dialog Header */
.app-dialog-header {
  padding: 16px 20px 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-dialog-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-dialog-icon.warning,
.app-dialog-icon.danger {
  background-color: #fee2e2;
  color: #dc2626;
}

.app-dialog-icon.info {
  background-color: #e0f2fe;
  color: #0284c7;
}

.app-dialog-icon.success {
  background-color: #dcfce7;
  color: #16a34a;
}

.app-dialog-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Dialog Message Body */
.app-dialog-body {
  padding: 0 20px 16px 20px;
}

.app-dialog-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #475569;
}

/* Dialog Action Footer */
.app-dialog-footer {
  padding: 12px 20px 16px 20px;
  background-color: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app-dialog-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  outline: none;
}

.app-dialog-btn.btn-cancel {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.app-dialog-btn.btn-cancel:hover {
  background-color: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.app-dialog-btn.btn-confirm-danger {
  background-color: #dc2626;
  border: 1px solid #dc2626;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.25);
}

.app-dialog-btn.btn-confirm-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

.app-dialog-input-group {
  margin-top: 12px;
}

.app-dialog-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-dialog-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.app-dialog-input::placeholder {
  color: #94a3b8;
}

.app-dialog-btn.btn-confirm-primary {
  background-color: #0d9488;
  border: 1px solid #0d9488;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.25);
}

.app-dialog-btn.btn-confirm-primary:hover {
  background-color: #0f766e;
  border-color: #0f766e;
}

/* Toast Notification System */
.app-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 12px 30px -5px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
  font-size: 13.5px;
  color: #0f172a;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.app-toast.success { border-left: 4px solid #10b981; }
.app-toast.danger { border-left: 4px solid #ef4444; }
.app-toast.warning { border-left: 4px solid #f59e0b; }
.app-toast.info { border-left: 4px solid #0ea5e9; }

.app-toast-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-toast-icon.success { color: #10b981; }
.app-toast-icon.danger { color: #ef4444; }
.app-toast-icon.warning { color: #f59e0b; }
.app-toast-icon.info { color: #0ea5e9; }

.app-toast-msg {
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}
