/* components.css — Toasts, Modals, specific reusable components */

/* ── Toast ───────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: #1E293B;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  max-width: 380px;
  animation: slideIn .25s ease;
  cursor: pointer;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast-icon { font-size: 16px; }
.toast-message { flex: 1; }
.toast.fade-out { animation: slideOut .25s ease forwards; }

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100px); opacity: 0; }
}

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn .15s ease;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: zoomIn .18s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--surface-2); color: var(--text-primary); }
.modal-body   { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn  { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Inline progress strip ───────────────────────────── */
.progress-strip {
  background: var(--accent-light);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.progress-strip-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.progress-strip-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ── Link health status indicators ──────────────────── */
.health-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.health-dot.active   { background: var(--success); }
.health-dot.not_found { background: var(--danger); }
.health-dot.oos_suggest { background: var(--warning); }
.health-dot.unknown  { background: var(--text-muted); }
.health-dot.manual_review { background: var(--info); }

/* ── Price comparison highlight ──────────────────────── */
.price-row td.best-price-cell {
  background: #F0FDF4;
  font-weight: 700;
  color: var(--success);
  position: relative;
}
.price-row td.best-price-cell::before {
  content: '✓';
  position: absolute;
  left: 6px;
  font-size: 10px;
  color: var(--success);
}

/* ── Skeleton loader ─────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Toolbar row ─────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 10px; flex: 1; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

/* ── URL display ─────────────────────────────────────── */
.url-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 20px;
  text-decoration: none;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.url-chip:hover { background: #DBEAFE; }
.url-empty { color: var(--text-muted); font-size: 12px; font-style: italic; }

/* ── Conversion badge ────────────────────────────────── */
.conv-badge {
  font-size: 11px;
  color: var(--info);
  background: #EEF2FF;
  padding: 2px 7px;
  border-radius: 20px;
}
