/* SmartVisitor Admin - Toast Notifications & Context Menu */

/* ============================================
   TOAST NOTIFICATIONS
   Note: toast.js uses inline styles for positioning
   These styles are fallbacks for legacy usage
   ============================================ */

/* Toast container - handled by toast.js */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  pointer-events: none;
  max-width: 300px;
}

/* Individual toast - compact style */
.toast {
  border-radius: 6px;
  padding: 8px 12px;
  min-width: 200px;
  max-width: 300px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  pointer-events: auto;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-success {
  border-left: 3px solid #10b981;
  background: #166534;
}

.toast-error {
  border-left: 3px solid #ef4444;
  background: #7f1d1d;
}

.toast-warning {
  border-left: 3px solid #f59e0b;
  background: #854d0e;
}

.toast-info {
  border-left: 3px solid #3b82f6;
  background: #1e3a5f;
}

/* ============================================
   CONTEXT MENU (Right-click)
   ============================================ */

.context-menu {
  position: absolute;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10000;
  animation: contextMenuFadeIn 0.15s ease-out;
}

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

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #e9eef7;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  font-size: 13px;
}

.context-menu-item:hover {
  background: #334155;
}

.context-menu-item:active {
  background: #475569;
}

.context-menu-separator {
  height: 1px;
  background: #334155;
  margin: 4px 8px;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 14px;
  color: #9aa4b2;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #e9eef7;
  font-weight: 500;
}

.breadcrumb-separator {
  color: #475569;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #334155;
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 19, 48, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-content {
  text-align: center;
  color: #e9eef7;
}

.loading-content .spinner {
  margin-bottom: 16px;
}

/* ============================================
   MODAL DIALOGS
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 19, 48, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

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

.modal {
  background: #0e1330;
  border: 1px solid #222741;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  animation: modalSlideIn 0.3s ease-out;
}

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

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

.modal-header h3 {
  margin: 0;
  color: #e9eef7;
  font-size: 18px;
}

.modal-close {
  background: transparent;
  border: none;
  color: #9aa4b2;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #1e293b;
  color: #e9eef7;
}

.modal-body {
  padding: 24px;
}

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

/* ============================================
   TOOLTIPS
   ============================================ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 6px 12px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #e9eef7;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10001;
  animation: tooltipFadeIn 0.2s ease-out;
}

[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px;
  border: 6px solid transparent;
  border-top-color: #334155;
  z-index: 10001;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

