/* ========== TOAST ========== */
.toast-container { position: fixed; top: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 12px; }

.toast {
  background: var(--bg-paper);
  border-radius: calc(var(--radius) * 1.5);
  padding: 16px 20px;
  box-shadow: var(--shadow-dropdown);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 300px;
  border-left: 4px solid var(--primary);
}

@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } }

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(0,167,111,0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast.success .toast-icon { background: rgba(34,197,94,0.08); color: var(--success); }
.toast.error .toast-icon { background: rgba(255,86,48,0.08); color: var(--error); }

.toast-content { flex: 1; }
.toast-title { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.toast-text { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 2px; }
.toast-close { background: none; border: none; color: var(--text-disabled); cursor: pointer; padding: 4px; transition: var(--transition); }
.toast-close:hover { color: var(--text-primary); }

/* ========== CONTEXT MENU ========== */
.context-menu {
  position: fixed;
  background: var(--bg-paper);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow-dropdown);
  padding: 8px;
  z-index: 2000;
  min-width: 200px;
  display: none;
  transform: translate(-50%, -50%);
}

.context-menu.active { display: block; }

.context-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.context-item:hover { background: var(--bg-neutral); }
.context-item i { width: 18px; color: var(--text-secondary); }
.context-item.danger { color: var(--error); }
.context-item.danger i { color: var(--error); }
.context-item.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.context-divider { height: 1px; background: var(--divider); margin: 8px 0; }

/* ========== MEDIA VIEWER ========== */
.media-viewer-overlay {
  z-index: 3200;
  background: rgba(0,0,0,0.9);
}

.media-viewer {
  position: relative;
  width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.media-viewer-stage {
  position: relative;
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-viewer-stage img {
  width: auto;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.media-viewer-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.media-viewer-close:hover { background: rgba(0,0,0,0.75); }

.media-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.media-viewer-nav:hover { background: rgba(0,0,0,0.72); }
.media-viewer-nav.prev { left: 12px; }
.media-viewer-nav.next { right: 12px; }

.media-viewer-counter {
  color: rgba(255,255,255,0.9);
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .media-viewer-stage { min-height: 50vh; }
  .media-viewer-nav {
    width: 38px;
    height: 38px;
  }
}
