/* SFM Widget Embedded Styles */
.sfm-widget-root {
  display: grid;
  gap: 0.5rem;
}

.sfm-widget-sentence {
  margin: 0;
  font-size: 1.6rem;
}

.sfm-widget-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: #f3f4f6;
  border-radius: 9999px;
  font-weight: 500;
  white-space: nowrap;
}

.sfm-widget-target-link {
  position: relative;
  z-index: 20; /* Above the overlay link */
  text-decoration: none;
}

.sfm-widget-meta {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  display: flex;
  gap: 1rem;
}

.sfm-widget-fact {
  display: flex;
  position: relative;
}

.sfm-widget-fact:last-child {
  margin-bottom: 0;
}

.sfm-widget-separator {
  /* empty for now */
  /* height: 1px;
  background: #e2e8f0;
  margin: 1.5rem 0; */
}

.sfm-widget-tag {
  align-content: center;
  color: #6b21a8;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.sfm-widget-link {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Visually hide link text but keep it available to assistive tech */
.sfm-widget-link > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sfm-widget-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.sfm-widget-link-icon {
  font-size: 0.875em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.sfm-widget-link:hover .sfm-widget-link-icon {
  opacity: 1;
}

.sfm-widget-error {
  padding: 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  color: #991b1b;
  font-size: 0.875rem;
}

.sfm-widget-error-title {
  display: block;
  font-weight: 600;
}

.sfm-widget-error-detail {
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* Footer */
.sfm-widget-footer {
  font-size: 1rem;
  color: #4b5563;
  text-align: right;
}

.sfm-widget-footer-link {
  color: inherit;
  text-decoration: underline;
}

.sfm-widget-footer-link:hover {
  text-decoration: none;
}
