/* Shared "Results" column styling - used by every admin Email Operations
   table (Bulk Email Verifier, Bulk Email Finder, Verify Email, Email Finder,
   API History) and the User Profile "File Reports" tab, so a request shows
   its live progress bar while processing and a Valid/Invalid/Catch-All/Risky
   breakdown once completed. Mirrors frontend/src/pages/Dashboard/email_verify.css. */

/* Compact "Uploaded Data" / "Results" quick-download shortcuts shown under
   the Project Name / File Name cell - a faster alternative to opening the
   row's Actions dropdown for these two most common actions. */
.inline-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.inline-download-icon {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 0.62rem;
  font-weight: 500;
  color: #0082a3;
  cursor: pointer;
  white-space: nowrap;
}

.inline-download-icon svg,
.inline-download-icon .spinner-border {
  /* !important is required here: the shared ActionIcon component (see
     frontend/src/components/ActionIcons.tsx) bakes a hardcoded
     `style={{ marginRight: '8px' }}` onto every icon it renders, and an
     element's own inline style attribute always wins over a plain
     stylesheet rule of any specificity - only !important can beat it. */
  margin-right: 0 !important;
}

.inline-download-icon:hover {
  text-decoration: underline;
}

.inline-download-icon.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

.inline-download-icon .spinner-border {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}

span.valid-td, span.invalid-td, span.catch-all, span.catchall-td, span.risky-td, span.paused-td {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

span.valid-td {
  background-color: #DBFFEC;
  color: #188240;
}

span.invalid-td {
  background-color: #FFDBE0;
  color: #DF5D5D;
}

span.catch-all {
  background-color: #FFF3CD;
  color: #946200;
}

span.catchall-td {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #7E8C9C;
}

span.risky-td {
  background-color: #F5F5F5;
  color: #7E8C9C;
}

span.paused-td {
  background-color: #E3F2FD;
  color: #0D5AA7;
}

span.validate {
  font-size: 12px;
  margin: 0px 3px 0px;
  color: #188240;
}

span.invalidate {
  font-size: 12px;
  margin: 0px 2px 0px;
  color: #DF5D5D;
}

span.catchall-count {
  font-size: 12px;
  margin: 0px 3px 0px;
  color: #000000;
}

span.risky-count {
  font-size: 12px;
  margin: 0px 3px 0px;
  color: #4B5563;
}

img.small-catch {
  width: 10px;
}

svg.catchall-icon {
  color: #000000;
}

svg.risky-icon {
  color: #4B5563;
}

.icon-tooltip {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-right: 12px;
}

.icon-tooltip:last-child {
  margin-right: 0;
}

.tooltip-text {
  position: absolute;
  top: 130%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.tooltip-text::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
}

.icon-tooltip:hover .tooltip-text {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

/* Portal-rendered tooltip: rendered into document.body via createPortal and
   positioned with fixed coordinates computed from the icon's bounding rect,
   so it can't be clipped by a table wrapper's overflow-x: auto. */
.tooltip-portal {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, 8px);
  opacity: 1;
  pointer-events: none;
  z-index: 99999;
}

.tooltip-portal::before {
  top: -6px;
}

.tooltip-valid {
  background-color: #E6F4EA;
  color: #1E7E34;
}

.tooltip-valid::before {
  border-color: transparent transparent #E6F4EA transparent;
}

.tooltip-invalid {
  background-color: #FDECEA;
  color: #B02A37;
}

.tooltip-invalid::before {
  border-color: transparent transparent #FDECEA transparent;
}

.tooltip-catchall {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #7E8C9C;
}

.tooltip-catchall::before {
  border-color: transparent transparent #FFFFFF transparent;
}

.tooltip-risky {
  background-color: #F3F4F6;
  color: #4B5563;
}

.tooltip-risky::before {
  border-color: transparent transparent #F3F4F6 transparent;
}

.results-cell-icons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

/* Shared row-actions kebab menu - used by every admin Email Operations table
   and the User Profile "File Reports" tab so the Actions column stays a
   single compact icon instead of a wide row of always-visible icons.
   Rendered via DropdownMenuPortal (portal to document.body), so it can't be
   clipped by a table wrapper's overflow-x: auto. */
.kebab-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.kebab-action-btn:hover,
.kebab-action-btn.open {
  background-color: rgba(0, 130, 163, 0.12);
}

.kebab-action-btn svg {
  margin-right: 0 !important;
  pointer-events: none;
}

.kebab-action-menu {
  padding: 0.35rem 0 !important;
  min-width: 170px !important;
}

.kebab-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0.45rem 0.9rem;
  border: none;
  background: transparent;
  color: #333;
  font-size: 0.8125rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.kebab-action-item svg,
.kebab-action-item .spinner-border {
  margin-right: 0 !important;
  flex-shrink: 0;
}

.kebab-action-item:hover {
  background-color: rgba(0, 130, 163, 0.1);
}

.kebab-action-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
