.tdc-public-table {
  --tdc-primary: #1d4ed8;
  --tdc-primary-dark: #1e3a8a;
  --tdc-border: #dbe3ef;
  --tdc-soft: #f5f8fc;
  --tdc-text: #1f2937;
  width: 100%;
  margin: 1.5rem 0;
  color: var(--tdc-text);
  font-size: 0.9rem;
}

.tdc-public-title {
  margin: 0 0 1rem;
  color: #111827;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.tdc-filter-panel {
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--tdc-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.tdc-filter-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: var(--tdc-primary-dark);
  font-weight: 750;
  cursor: default;
  list-style: none;
  pointer-events: none;
  user-select: none;
}

.tdc-filter-panel summary::-webkit-details-marker {
  display: none;
}

.tdc-filter-panel summary::after {
  display: none;
  content: "";
  margin-left: auto;
  font-size: 1.24rem;
  line-height: 1;
}

.tdc-filter-panel[open] summary::after {
  content: "−";
}

.tdc-filter-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tdc-filter-count {
  margin-left: auto;
  color: #64748b;
  font-size: 0.79rem;
  font-weight: 600;
}

.tdc-filter-fields {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--tdc-border);
  background: var(--tdc-soft);
}

.tdc-filter-fields label > span {
  display: block;
  margin-bottom: 5px;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 750;
}

.tdc-filter-fields input,
.tdc-filter-fields select {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #1f2937;
  background: #fff;
  font: inherit;
}

.tdc-filter-fields input:focus,
.tdc-filter-fields select:focus {
  border-color: var(--tdc-primary);
  outline: 3px solid rgba(29, 78, 216, 0.13);
}

.tdc-filter-clear {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tdc-filter-clear:hover {
  border-color: var(--tdc-primary);
  color: var(--tdc-primary);
}

.tdc-main-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tdc-column-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.79rem;
  cursor: pointer;
}

.tdc-column-filter-toggle:hover,
.tdc-column-filter-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.tdc-public-table tr[hidden],
.tdc-no-results[hidden] {
  display: none !important;
}

.tdc-no-results td {
  padding: 26px !important;
  color: #64748b;
  text-align: center !important;
}

.tdc-responsive-wrap {
  overflow-x: auto;
  border: 1px solid var(--tdc-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.tdc-public-table table {
  width: 100%;
  min-width: 1280px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.tdc-public-table th,
.tdc-public-table td {
  padding: 15px 9px;
  border: 0;
  border-bottom: 1px solid var(--tdc-border);
  text-align: left;
  vertical-align: middle;
}

.tdc-public-table thead th {
  color: #fff;
  background: var(--tdc-primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.tdc-public-table tbody tr:nth-child(even) {
  background: var(--tdc-soft);
}

.tdc-public-table tbody tr:last-child th,
.tdc-public-table tbody tr:last-child td {
  border-bottom: 0;
}

.tdc-public-table tbody tr:hover {
  background: #eef5ff;
}

.tdc-public-table tbody th {
  min-width: 0;
  color: #111827;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tdc-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #fff !important;
  background: var(--tdc-primary);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tdc-download:hover,
.tdc-download:focus-visible {
  color: #fff !important;
  background: var(--tdc-primary-dark);
  transform: translateY(-1px);
}

.tdc-download:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.3);
  outline-offset: 2px;
}

.tdc-attachment-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  padding: 3px;
  border-radius: 8px;
  background: var(--tdc-primary);
  max-width: 100%;
}

.tdc-copy-link,
.tdc-blog-link {
  display: inline-flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #93b4f8;
  border-radius: 50%;
  color: #1d4ed8;
  background: #eff6ff;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.tdc-copy-link:hover,
.tdc-copy-link:focus-visible,
.tdc-blog-link:hover,
.tdc-blog-link:focus-visible {
  color: #fff;
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
  outline: none;
}

.tdc-copy-link.is-copied {
  border-color: #16a34a;
  color: #fff;
  background: #16a34a;
}

.tdc-copy-link:disabled {
  cursor: wait;
}

.tdc-copy-icon {
  font-size: 0.88rem;
}

.tdc-blog-link {
  text-decoration: none !important;
  font-size: 0.88rem;
}

.tdc-attachment-actions .tdc-attachment-link {
  order: 2;
  padding: 7px 5px;
  font-size: 0.72rem;
}

.tdc-attachment-link > span[aria-hidden] {
  display: none;
}

.tdc-attachment-actions .tdc-copy-link {
  order: 1;
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.tdc-attachment-actions .tdc-copy-icon {
  font-size: 0.75rem;
}

.tdc-mailing-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #fff !important;
  background: #f05a24;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tdc-mailing-link:hover,
.tdc-mailing-link:focus-visible {
  color: #fff !important;
  background: #c2410c;
  transform: translateY(-1px);
}

.tdc-mailing-link:focus-visible {
  outline: 3px solid rgba(240, 90, 36, 0.25);
  outline-offset: 2px;
}

.tdc-video-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #fff !important;
  background: #7c3aed;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tdc-video-link:hover,
.tdc-video-link:focus-visible {
  color: #fff !important;
  background: #5b21b6;
  transform: translateY(-1px);
}

.tdc-video-link:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.25);
  outline-offset: 2px;
}

.tdc-publish-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.tdc-publish-status-pending {
  color: #92400e;
  background: #fef3c7;
}

.tdc-publish-status-published {
  color: #166534;
  background: #dcfce7;
}

.tdc-status-control {
  display: inline-block;
  position: relative;
  z-index: 2;
}

.tdc-status-control[open] {
  z-index: 20;
}

.tdc-status-summary {
  border: 1px solid rgba(15, 23, 42, 0.12);
  cursor: pointer;
  list-style: none;
  user-select: none;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.tdc-status-summary::-webkit-details-marker {
  display: none;
}

.tdc-status-summary:hover,
.tdc-status-summary:focus-visible,
.tdc-status-control[open] .tdc-status-summary {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
  outline: 2px solid rgba(29, 78, 216, 0.28);
  outline-offset: 2px;
}

.tdc-status-summary.is-updating {
  cursor: wait;
  opacity: 0.62;
  pointer-events: none;
}

.tdc-status-chevron {
  margin-left: 6px;
  font-size: 0.9em;
  transition: transform 0.16s ease;
}

.tdc-status-control[open] .tdc-status-chevron {
  transform: rotate(180deg);
}

.tdc-status-options {
  display: grid;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 132px;
  overflow: hidden;
  border: 1px solid #d7dee9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.tdc-status-options button {
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  background: #fff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.tdc-status-options button:last-child {
  border-bottom: 0;
}

.tdc-status-options button:hover,
.tdc-status-options button:focus-visible {
  color: #1e3a8a;
  background: #eff6ff;
  outline: none;
}

.tdc-status-options button[aria-current="true"] {
  color: #1e3a8a;
  background: #dbeafe;
  font-weight: 750;
}

.tdc-channel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tdc-channel-list > span:not(.tdc-no-file) {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.tdc-no-file,
.tdc-empty {
  color: #6b7280;
}

.tdc-empty {
  padding: 18px;
  border: 1px dashed var(--tdc-border);
  border-radius: 10px;
  background: var(--tdc-soft);
}

@media (max-width: 700px) {
	.tdc-public-table table {
		table-layout: auto;
	}

	.tdc-filter-fields {
	  grid-template-columns: 1fr;
	}

	.tdc-filter-count {
	  display: none;
	}

  .tdc-responsive-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .tdc-public-table table,
  .tdc-public-table tbody,
  .tdc-public-table tr,
  .tdc-public-table th,
  .tdc-public-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .tdc-public-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .tdc-public-table tbody tr {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--tdc-border);
    border-radius: 12px;
    background: #fff !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  }

  .tdc-public-table th,
  .tdc-public-table td {
    display: grid;
    grid-template-columns: minmax(95px, 34%) 1fr;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--tdc-border);
    text-align: right;
  }

  .tdc-public-table th::before,
  .tdc-public-table td::before {
    content: attr(data-label);
    color: #4b5563;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: left;
    text-transform: uppercase;
  }

  .tdc-public-table tbody tr > :last-child {
    border-bottom: 0;
  }

  .tdc-download,
  .tdc-mailing-link,
  .tdc-video-link {
    justify-self: end;
  }

  .tdc-attachment-actions {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tdc-download,
  .tdc-mailing-link,
  .tdc-video-link,
  .tdc-copy-link,
  .tdc-status-summary,
  .tdc-status-chevron {
    transition: none;
  }
}
