/* Only the mail-follow-up table and its cards; shared pending styles stay untouched. */
.email-follow-up-panel,
.email-follow-up-panel #emailFollowUpRows,
.email-follow-up-panel .table-wrap {
  min-width: 0;
  max-width: 100%;
}

.email-follow-up-panel .email-follow-up-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.email-follow-up-panel .email-follow-up-table th,
.email-follow-up-panel .email-follow-up-table td {
  padding: 12px 10px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* The six common columns keep the same meaning with or without a survey filter. */
.email-follow-up-table th:nth-last-child(6) { width: 17%; }
.email-follow-up-table th:nth-last-child(5) { width: 20%; }
.email-follow-up-table th:nth-last-child(4) { width: 12%; }
.email-follow-up-table th:nth-last-child(3) { width: 15%; }
.email-follow-up-table th:nth-last-child(2) { width: 18%; }
.email-follow-up-table th:nth-last-child(1) { width: 18%; }

.email-follow-up-table:has(thead th:nth-child(7)) th:first-child { width: 10%; }
.email-follow-up-table:has(thead th:nth-child(7)) th:nth-last-child(6) { width: 14%; }
.email-follow-up-table:has(thead th:nth-child(7)) th:nth-last-child(5) { width: 17%; }
.email-follow-up-table:has(thead th:nth-child(7)) th:nth-last-child(4) { width: 12%; }
.email-follow-up-table:has(thead th:nth-child(7)) th:nth-last-child(3) { width: 13%; }
.email-follow-up-table:has(thead th:nth-child(7)) th:nth-last-child(2) { width: 16%; }

.email-follow-up-panel .email-seller-cell,
.email-follow-up-panel .email-follow-up-dates,
.email-follow-up-panel .response-count-summary {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.email-follow-up-panel .email-copy-state,
.email-follow-up-panel .badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.email-follow-up-panel .email-copy-state .icon { flex: 0 0 16px; }

.email-follow-up-panel .email-response-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(50px, 1fr);
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.email-follow-up-panel .email-response-actions .button {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  height: 100%;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.email-follow-up-panel .email-response-actions .button .icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
}

/* Use the existing card markup before a seven-column table becomes cramped. */
@media (max-width: 1100px) {
  .email-follow-up-panel .table-wrap { display: none; }
  .email-follow-up-panel .mobile-card-list {
    display: grid;
    gap: 12px;
    min-width: 0;
  }
  .email-follow-up-panel .mobile-data-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow-wrap: anywhere;
  }
  .email-follow-up-panel .mobile-data-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .email-follow-up-panel .mobile-data-card-head > div { min-width: 0; }
  .email-follow-up-panel .mobile-data-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
  }
  .email-follow-up-panel .mobile-data-card-head > .badge { flex-shrink: 0; }
}
