/* ============================================================
   URL Scanner tool - supplemental styles
   Everything here builds on base.css tokens and components.
   No new colors or fonts are introduced.
   ============================================================ */

/* Reuses @keyframes spin already defined in base.css */
#scan-btn-icon.spin {
  animation: spin 0.9s linear infinite;
  transform-origin: 50% 50%;
}

/* Link-icon fountain effect, one particle per URL found during a scan */
#link-particle-layer {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
  overflow: hidden;
}

.link-particle {
  position: fixed;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  color: var(--c-accent);
  will-change: transform, opacity;
  animation: link-particle-pop var(--dur, 1.1s) cubic-bezier(0.25, 0.7, 0.35, 1) forwards;
}

.link-particle svg {
  width: 100%;
  height: 100%;
}

@keyframes link-particle-pop {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  14% {
    opacity: 1;
  }
  32% {
    transform: translate(calc(var(--dx) * 0.4), var(--rise)) scale(1) rotate(var(--rot));
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--fall)) scale(0.6) rotate(calc(var(--rot) * 2));
  }
}

/* Numbered step badge in front of each card's title */
.card-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  border: 1px solid var(--c-accent);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-family: var(--f-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.status-line {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  font-family: var(--f-mono);
  min-height: 16px;
}

.status-line.is-info {
  color: var(--c-ink-3);
}

.status-line.is-success {
  color: var(--c-success);
}

.status-line.is-error {
  color: var(--c-danger);
}

/* Danger-flavored ghost button, e.g. "Remove selected" */
.btn--danger-ghost {
  color: var(--c-rose);
}

.btn--danger-ghost:hover {
  background: var(--c-rose-soft);
  border-color: var(--c-rose);
}

/* Scrollable table body with a sticky header, for long URL lists */
.table-wrap--scroll {
  max-height: 440px;
  overflow-y: auto;
}

.table-wrap--scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

#url-table td {
  vertical-align: middle;
}

.url-cell {
  word-break: break-all;
}

#url-table input[type="checkbox"],
#header-checkbox {
  accent-color: var(--c-accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.row-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--c-ink-4);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.row-remove-btn:hover {
  color: var(--c-rose);
  background: var(--c-rose-soft);
  border-color: var(--c-rose);
}

.row-remove-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}
