/**
 * VE Vector Tables — public styles.
 * Designed to match the reference layout: compact filter groups separated
 * by thin bottom dividers, section headers with a left navy accent bar,
 * and a data table with a navy header + auto-sized columns.
 *
 * All defaults can be overridden per-table via the Style panel in admin,
 * which emits a scoped <style> block rendered BEFORE this stylesheet on page.
 */

/* ==========================================================================
   Wrapper
   ========================================================================== */
.vect-table {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 18px;
	line-height: 24px;
	color: #1f2937;
	margin: 0 0 23px;
}

/* ==========================================================================
   Filters — title sits on the line, chips underneath (image 1)
   ========================================================================== */
.vect-filters {
	margin: 0 0 28px;
}

.vect-filter-group {
	padding: 0;
	margin-bottom: 14px;
}
.vect-filter-group:last-child {
	margin-bottom: 0;
}

.vect-filter-group__title-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.vect-filter-group__label {
	flex-shrink: 0;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	line-height: 1;
}

.vect-filter-group__line {
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.vect-filter-group__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vect-chip {
	display: inline-flex;
	align-items: center;
	padding: 10px 30px;
	background: #f3f4f6;
	border: 0;
	border-radius: 999px;
	color: #374151;
	font-family: inherit;
	font-size: 18px;
	line-height: 18px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.vect-chip:hover {
	background: #e5e7eb;
}
.vect-chip--active {
	background: #111827;
	color: #fff;
}
.vect-chip--active:hover {
	background: #1f2937;
}

/* ==========================================================================
   Table body container
   ========================================================================== */
.vect-table__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.vect-table__empty,
.vect-table__no-results {
	padding: 40px 16px;
	text-align: center;
	color: #6b7280;
	font-style: italic;
	background: #f9fafb;
	border-radius: 4px;
}

/* ==========================================================================
   Sections — image 1: navy accent bar on the left, large heading
   ========================================================================== */
.vect-section {
	margin: 0;
}

.vect-section__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 0 0 0 14px;
	margin: 0 0 14px;
	border-left: 4px solid #243b66;
}

.vect-section__title {
	margin: 0;
	padding: 0;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: #111827;
}

.vect-section__count {
	flex-shrink: 0;
	padding: 4px 14px;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	font-size: 11px;
	color: #6b7280;
	line-height: 1.3;
	white-space: nowrap;
}

/* ==========================================================================
   Data table — semantic <table> with auto column widths
   ========================================================================== */
.vect-data-table {
	width: 100%;
	border-collapse: separate; /* allows border-radius on header cells */
	border-spacing: 0;
	table-layout: auto;
}

/* Header row (thead th) — navy background from image */
.vect-th {
	background: #243b66;
	color: #fff;
	padding: 14px 16px;
	text-align: left;
	vertical-align: middle;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;   /* header stays on one line */
}
.vect-th:first-child {
	border-top-left-radius: 2px;
	border-bottom-left-radius: 2px;
}
.vect-th:last-child {
	border-top-right-radius: 2px;
	border-bottom-right-radius: 2px;
}

/* Rows — border-bottom applied to cells because tr borders don't render
   with border-collapse: separate. */
.vect-tr {
	transition: background 0.12s ease;
}
.vect-tr:hover {
	background: #f9fafb;
}

/* Cells */
.vect-td {
	padding: 16px;
	vertical-align: middle;
	font-size: 14px;
	line-height: 1.5;
	border-bottom: 1px solid #e5e7eb;
}
.vect-td--main {
	padding-right: 24px;
}
.vect-td__empty {
	color: #9ca3af;
}

/* Title + subtitle in the main column */
.vect-row__title {
	display: block;
	font-weight: 500;
	color: #111827;
}
.vect-row__subtitle {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #6b7280;
}

/* Action link — right-aligned pill button */
.vect-td--link {
	text-align: right;
	white-space: nowrap;
	padding-left: 8px;
}
.vect-row__link {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	color: #111827;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.3;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.vect-row__link:hover,
.vect-row__link:focus {
	background: #111827;
	color: #fff;
	border-color: #111827;
	text-decoration: none;
}

/* ==========================================================================
   Cell display formats
   ========================================================================== */
.vect-badge-attr {
	display: inline-block;
	padding: 3px 10px;
	margin-right: 4px;
	background: #fee2e2;
	color: #991b1b;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	line-height: 1.3;
}

.vect-td--fmt-pipe {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ==========================================================================
   Filter state — hide non-matching rows and empty sections
   ========================================================================== */
.vect-tr[hidden],
.vect-section[hidden] {
	display: none !important;
}

/* ==========================================================================
   Horizontal scroll wrapper — keeps table layout on mobile, adds X scroll
   ========================================================================== */
.vect-table__scroll {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	/* Show a subtle gradient shadow at the right edge when scrollable */
/* 	background:
		linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
		linear-gradient(to right, rgba(255,255,255,0), #fff 70%) 100% 0,
		radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.08), rgba(0,0,0,0)),
		radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.08), rgba(0,0,0,0)) 100% 0; */
	background-repeat: no-repeat;
	background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
	background-attachment: local, local, scroll, scroll;
}

/* Scrollbar styling — slim, visible on mobile touch */
.vect-table__scroll::-webkit-scrollbar {
	height: 8px;
}
.vect-table__scroll::-webkit-scrollbar-track {
	background: #f3f4f6;
	border-radius: 4px;
}
.vect-table__scroll::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 4px;
}
.vect-table__scroll::-webkit-scrollbar-thumb:hover {
	background: #9ca3af;
}

/* On narrow screens, force a minimum table width so columns keep breathing room.
   Scrolling kicks in automatically when the viewport is narrower than this. */
@media (max-width: 720px) {
	/*.vect-table__scroll .vect-data-table {
		min-width: 640px;
	}*/
	.vect-section__title {
		font-size: 22px;
	}
}


@media (max-width: 767px) {

  .vect-data-table,
  .vect-data-table thead,
  .vect-data-table tbody,
  .vect-data-table tr,
  .vect-data-table th,
  .vect-data-table td {
    display: block;
    width: 100%;
  }

  .vect-data-table thead {
    display: none;
  }

  .vect-data-table .vect-tr {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
  }

  .vect-data-table .vect-td {
    padding: 8px 0;
    border: none;
  }

  .vect-data-table .vect-td--main {
    padding-bottom: 12px;
  }

  .vect-data-table .vect-row__title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
  }

  /* NEW */
  .vect-data-table .mobile-label {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.65;
  }

  .vect-data-table .vect-row__link {
    display: inline-block;
    width: 100%;
  }

  .vect-td--link {
    text-align: center;
  }

}