.report-email-progress[hidden],
.pdf-operation-progress__actions[hidden],
.report-email-progress form[hidden],
.report-email-progress__action[hidden] {
  display: none;
}

.report-email-progress {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: min(42rem, calc(100% - 1.5rem));
  margin: 0 auto 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 0.65rem 0.85rem;
}

.report-email-progress__icon {
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
}

.report-email-progress__heading {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.report-email-progress__heading span {
  font-size: 0.8rem;
}

.report-email-progress__action {
  flex-shrink: 0;
  border: 1px solid currentColor;
  border-radius: 9999px;
  background: #fff;
  color: inherit;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.report-email-progress__action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.report-email-progress__action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.report-email-progress[data-state="sent"] {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.report-email-progress[data-state="failed"],
.report-email-progress[data-state="unknown"] {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.report-email-progress[data-state="canceled"] {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #374151;
}

.report-email-progress[data-state="preparing"] .report-email-progress__check,
.report-email-progress[data-state="failed"] .report-email-progress__check,
.report-email-progress[data-state="unknown"] .report-email-progress__check,
.report-email-progress[data-state="canceled"] .report-email-progress__check {
  display: none;
}

.pdf-operation-progress[data-state="queued"] .report-email-progress__check,
.pdf-operation-progress[data-state="running"] .report-email-progress__check {
  display: none;
}

.pdf-operation-progress__actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pdf-operation-progress__actions a {
  display: inline-block;
  text-decoration: none;
}

.pdf-operation-progress__meter {
  width: 100%;
  height: 0.65rem;
  margin-block: 0.35rem;
  accent-color: currentColor;
}

.pdf-operation-progress__failures {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .report-email-progress {
    gap: 0.55rem;
    padding: 0.6rem;
  }

  .report-email-progress__icon {
    width: 1.4rem;
    height: 1.4rem;
  }
}

@media print {
  .report-email-progress {
    display: none !important;
  }
}
