/* ==========================================================================
   Job Alerts - Dashboard
   Matches saved_jobs card-entry pattern with alert-specific additions.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Alert list entries
   -------------------------------------------------------------------------- */

.dash-alert-entry {
  position: relative;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--th-border-light);
  transition: background 0.15s ease;
}

.dash-alert-entry:last-child {
  border-bottom: none;
}

.dash-alert-entry:hover {
  background: #f9fafb;
}

.dash-alert-marker {
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 4px;
  height: 28px;
  border-radius: 0 3px 3px 0;
  background: #3b82f6;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dash-alert-marker-paused {
  background: #94a3b8;
}

.dash-alert-entry:hover .dash-alert-marker {
  opacity: 1;
}

.dash-alert-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dash-alert-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-alert-info {
  min-width: 0;
}

.dash-alert-name {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--th-text);
}

.dash-alert-frequency {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--th-text-secondary);
  margin-top: 0.1rem;
}

/* --------------------------------------------------------------------------
   Alert action buttons (matches dash-saved-job-quick-btn pattern)
   -------------------------------------------------------------------------- */

.dash-alert-actions-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.dash-alert-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--th-font);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dash-alert-quick-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.dash-alert-quick-btn-edit {
  color: var(--th-accent);
  background: rgba(13, 110, 253, 0.06);
}

.dash-alert-quick-btn-edit:hover {
  background: rgba(13, 110, 253, 0.12);
  color: #0b5ed7;
  text-decoration: none;
}

.dash-alert-quick-btn-pause {
  color: #d97706;
  background: rgba(217, 119, 6, 0.06);
}

.dash-alert-quick-btn-pause:hover {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.dash-alert-quick-btn-resume {
  color: #059669;
  background: rgba(5, 150, 105, 0.06);
}

.dash-alert-quick-btn-resume:hover {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}

.dash-alert-quick-btn-delete {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.06);
}

.dash-alert-quick-btn-delete:hover {
  background: rgba(220, 53, 69, 0.12);
  color: #bb2d3b;
}

/* --------------------------------------------------------------------------
   Alert meta row (status, filter chips, date)
   -------------------------------------------------------------------------- */

.dash-alert-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.15rem;
  flex-wrap: wrap;
}

.dash-alert-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dash-alert-status-active {
  background: #dcfce7;
  color: #15803d;
}

.dash-alert-status-paused {
  background: #f1f5f9;
  color: #64748b;
}

.dash-alert-filter-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #eef1f5;
  color: #475569;
  letter-spacing: 0.01em;
}

.dash-alert-date {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--th-text-muted);
}

.dash-alert-date svg {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   Form - search criteria display
   -------------------------------------------------------------------------- */

.dash-alert-criteria-display {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  padding: 0.75rem 1rem;
}

.dash-alert-criteria-row {
  display: flex;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--th-border-light);
  font-size: 0.85rem;
}

.dash-alert-criteria-row:last-child {
  border-bottom: none;
}

.dash-alert-criteria-label {
  font-weight: 600;
  color: var(--th-text-secondary);
  min-width: 130px;
  flex-shrink: 0;
}

.dash-alert-criteria-value {
  color: var(--th-text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
  .dash-alert-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .dash-alert-actions-row {
    flex-wrap: wrap;
  }

  .dash-alert-criteria-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .dash-alert-criteria-label {
    min-width: 0;
  }
}
