/* ==========================================================================
   GDCONF Data Table — frontend styles
   ========================================================================== */

/* ── Block wrapper ────────────────────────────────────────────────────────── */

.gdconf-data-table-block {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
}

.gdconf-data-table-block *,
.gdconf-data-table-block *::before,
.gdconf-data-table-block *::after {
	box-sizing: inherit;
}

/* ── Filter bar ───────────────────────────────────────────────────────────── */

.gdconf-dt-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 14px;
	padding: 16px;
	margin-bottom: 20px;
	background: #fff;
	border: 1px solid #e6eaf0;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(15,23,42,.05);
}

.gdconf-dt-filter-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 132px;
}

.gdconf-dt-filter-item label {
	font-size: 10.5px;
	font-weight: 700;
	color: #8792a5;
	text-transform: uppercase;
	letter-spacing: .07em;
	line-height: 1;
	padding-left: 2px;
}

.gdconf-dt-filter-select,
.gdconf-dt-search {
	height: 40px;
	padding: 8px 12px;
	font-size: 13.5px;
	font-family: inherit;
	color: #1e293b;
	border: 1px solid #dde3ec;
	border-radius: 10px;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}
.gdconf-dt-filter-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	padding-right: 30px;
	cursor: pointer;
}
.gdconf-dt-filter-select:hover,
.gdconf-dt-search:hover {
	border-color: #c6cfdd;
}
.gdconf-dt-filter-select:focus,
.gdconf-dt-search:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,.14);
	outline: none;
}

.gdconf-dt-filter-item--search {
	flex: 1;
	min-width: 200px;
	flex-direction: row;
	align-items: center;
}
.gdconf-dt-filter-item--search .gdconf-dt-search {
	width: 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 10px center;
	padding-left: 34px;
}

.gdconf-dt-filter-item--reset {
	min-width: auto;
	flex-direction: row;
	align-items: flex-end;
}

.gdconf-dt-reset {
	height: 40px;
	padding: 0 18px;
	font-size: 12.5px;
	font-weight: 600;
	font-family: inherit;
	color: #64748b;
	background: #fff;
	border: 1px solid #dde3ec;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.12s, color 0.12s, border-color 0.12s;
	white-space: nowrap;
}
.gdconf-dt-reset:hover {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #b91c1c;
}

/* Mobile-only collapse toggle — revealed by the media query below. */
.gdconf-dt-filter-toggle {
	display: none;
	align-items: center;
	gap: 11px;
	width: 100%;
	height: 48px;
	padding: 0 16px;
	margin-bottom: 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	background: #fff;
	border: 1px solid #e6eaf0;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(15,23,42,.04);
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.gdconf-dt-filter-toggle:hover {
	border-color: #d3dae5;
	box-shadow: 0 2px 6px rgba(15,23,42,.07);
}
.gdconf-dt-filter-toggle__icon {
	width: 18px;
	height: 18px;
	flex: none;
	color: #2563eb;
}
.gdconf-dt-filter-toggle__label {
	flex: 1;
	text-align: left;
}
.gdconf-dt-filter-toggle__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: #2563eb;
	border-radius: 100px;
}
.gdconf-dt-filter-toggle__count[hidden] {
	display: none;
}
.gdconf-dt-filter-toggle__chevron {
	font-size: 11px;
	color: #94a3b8;
	transition: transform .2s ease;
}
.gdconf-filters-open .gdconf-dt-filter-toggle__chevron {
	transform: rotate(180deg);
}

/* Panel entrance when expanded on mobile. */
@keyframes gdconf-filters-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: none; }
}

/* ── Table wrapper + AJAX loading state ───────────────────────────────────── */

.gdconf-dt-table-wrap {
	overflow-x: auto;
	border-radius: 8px;
	position: relative;
	min-height: 80px;
}

.gdconf-dt-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 32px 16px;
	color: #94a3b8;
	font-size: 13px;
}

.gdconf-dt-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid #e2e8f0;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: gdconf-spin .7s linear infinite;
	flex-shrink: 0;
}

@keyframes gdconf-spin {
	to { transform: rotate(360deg); }
}

table.gdconf-dt {
	font-size: 13.5px;
	border-collapse: collapse;
	width: 100% !important;
	margin: 0 !important;
}

table.gdconf-dt thead th {
	background: #f1f5f9;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #64748b;
	padding: 10px 12px;
	border-bottom: 2px solid #e2e8f0 !important;
	white-space: nowrap;
	user-select: none;
}
table.gdconf-dt thead th.dt-orderable-asc:hover,
table.gdconf-dt thead th.dt-orderable-desc:hover {
	background: #e8eef6;
}
table.gdconf-dt thead th.dt-ordering-asc,
table.gdconf-dt thead th.dt-ordering-desc {
	color: #2563eb;
}
table.gdconf-dt thead th .dt-column-order {
	opacity: .3;
}
table.gdconf-dt thead th.dt-ordering-asc .dt-column-order,
table.gdconf-dt thead th.dt-ordering-desc .dt-column-order {
	opacity: 1;
}

table.gdconf-dt td {
	padding: 8px 12px;
	border-bottom: 1px solid #f1f5f9;
	color: #1e293b;
	vertical-align: middle;
	line-height: 1.45;
}
table.gdconf-dt tbody tr:last-child td {
	border-bottom: none;
}
table.gdconf-dt tbody tr:nth-child(even) td {
	background: #fafafa;
}
table.gdconf-dt tbody tr {
	cursor: pointer;
}
table.gdconf-dt tbody tr:hover td {
	background: var(--dt-hover-bg, #eff6ff);
}

/* ── Border reset ─────────────────────────────────────────────────────────────
 * DataTables' default stylesheet (loaded from CDN) and some themes add their
 * own cell borders — vertical column lines and a heavy outer frame — which
 * render inconsistently across Firefox / Safari / Opera. Strip them all and
 * keep only the soft horizontal row dividers defined above, so the table looks
 * identical everywhere and blends into the page.
 * ------------------------------------------------------------------------- */
table.gdconf-dt,
table.gdconf-dt th,
table.gdconf-dt td {
	border-top: 0 !important;
	border-left: 0 !important;
	border-right: 0 !important;
}
table.gdconf-dt thead th {
	border-bottom: 2px solid #e8edf3 !important;
}
table.gdconf-dt tbody td {
	border-bottom: 1px solid #f1f5f9 !important;
}
table.gdconf-dt tbody tr:last-child td {
	border-bottom: 0 !important;
}

/* ── Logo column ──────────────────────────────────────────────────────────── */

/* Column width tracks the logo height set in the block editor, so raising
   the height widens the column instead of squashing the image. */
.gdconf-dt-col-logo {
	width: calc(var(--dt-logo-h, 40px) * 2 + 16px) !important;
	min-width: calc(var(--dt-logo-h, 40px) * 2 + 16px);
	text-align: center;
	padding: 4px 8px !important;
}

.gdconf-dt-logo {
	height: var(--dt-logo-h, 40px);
	width: auto;
	max-width: calc(var(--dt-logo-h, 40px) * 2);
	display: block;
	margin: auto;
	border-radius: 3px;
	object-fit: contain;
}

/* ── Name column + tag chips ──────────────────────────────────────────────── */

.gdconf-dt-name {
	display: block;
	font-weight: 600;
}

.gdconf-dt-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 5px;
}

.gdconf-dt-tag {
	display: inline-block;
	font-size: 10.5px;
	line-height: 1.7;
	padding: 0 7px;
	border-radius: 9px;
	background: #f1f5f9;
	color: #64748b;
	border: 1px solid #e2e8f0;
	white-space: nowrap;
}

/* ── URL link ─────────────────────────────────────────────────────────────── */

.gdconf-dt-link {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 12px;
	font-weight: 600;
	color: #2563eb;
	text-decoration: none;
	padding: 3px 9px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 5px;
	white-space: nowrap;
	transition: background 0.12s, border-color 0.12s;
}
.gdconf-dt-link:hover {
	background: #dbeafe;
	border-color: #93c5fd;
	text-decoration: none;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */

.gdconf-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 100px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	white-space: nowrap;
	line-height: 1.7;
}

.gdconf-badge--scheduled  { background: #dcfce7; color: #166534; }
.gdconf-badge--finished   { background: #f1f5f9; color: #475569; }
.gdconf-badge--canceled,
.gdconf-badge--cancelled  { background: #fee2e2; color: #991b1b; }
.gdconf-badge--delayed    { background: #fff7ed; color: #c2410c; }
.gdconf-badge--ongoing    { background: #dbeafe; color: #1d4ed8; }
.gdconf-badge--today      { background: #fef9c3; color: #854d0e; }
.gdconf-badge--physical   { background: #ede9fe; color: #5b21b6; }
.gdconf-badge--virtual    { background: #e0f2fe; color: #0369a1; }
.gdconf-badge--hybrid     { background: #d1fae5; color: #065f46; }
.gdconf-badge--open       { background: #dcfce7; color: #166534; }
.gdconf-badge--closed     { background: #f1f5f9; color: #475569; }
.gdconf-badge--upcoming   { background: #dbeafe; color: #1d4ed8; }
.gdconf-badge--past       { background: #f1f5f9; color: #475569; }
.gdconf-badge--b2b        { background: #ede9fe; color: #5b21b6; }
.gdconf-badge--b2c        { background: #fce7f3; color: #9d174d; }
.gdconf-badge--b2b2c      { background: #fdf4ff; color: #7e22ce; }
.gdconf-badge--everyone   { background: #f0fdf4; color: #166534; }
.gdconf-badge--new        { background: #dcfce7; color: #14532d; font-size: 10px; letter-spacing: .06em; }

/* ── Flags column ─────────────────────────────────────────────────────────── */

.gdconf-dt-col-flags {
	width: 44px !important;
	min-width: 44px;
	text-align: center;
	padding: 4px 4px !important;
	white-space: nowrap;
}

.gdconf-flag {
	font-size: 14px;
	line-height: 1;
	display: inline-block;
}

/* ── Featured / Pinned row highlight ─────────────────────────────────────── */

table.gdconf-dt tbody tr.gdconf-row--pinned > td:first-child,
table.gdconf-dt tbody tr.gdconf-row--featured > td:first-child {
	border-left: 3px solid;
}
table.gdconf-dt tbody tr.gdconf-row--pinned   > td:first-child { border-left-color: #f59e0b; }
table.gdconf-dt tbody tr.gdconf-row--featured > td:first-child { border-left-color: #fbbf24; }

table.gdconf-dt tbody tr.gdconf-row--pinned   td { background: #fffbeb !important; }
table.gdconf-dt tbody tr.gdconf-row--featured td { background: #fefce8 !important; }
table.gdconf-dt tbody tr.gdconf-row--pinned:hover   td,
table.gdconf-dt tbody tr.gdconf-row--featured:hover td { filter: brightness(.97); }

/* ── Cancelled / Delayed / Postponed row highlight ───────────────────────── */

table.gdconf-dt tbody tr.gdconf-row--cancelled > td:first-child,
table.gdconf-dt tbody tr.gdconf-row--canceled  > td:first-child  { border-left: 3px solid #ef4444; }
table.gdconf-dt tbody tr.gdconf-row--delayed   > td:first-child  { border-left: 3px solid #f97316; }
table.gdconf-dt tbody tr.gdconf-row--postponed > td:first-child  { border-left: 3px solid #eab308; }

table.gdconf-dt tbody tr.gdconf-row--cancelled td,
table.gdconf-dt tbody tr.gdconf-row--canceled  td { background: #fff5f5 !important; }
table.gdconf-dt tbody tr.gdconf-row--delayed   td { background: #fff7ed !important; }
table.gdconf-dt tbody tr.gdconf-row--postponed td { background: #fefce8 !important; }

[data-color-mode="dark"] table.gdconf-dt tbody tr.gdconf-row--cancelled td,
[data-color-mode="dark"] table.gdconf-dt tbody tr.gdconf-row--canceled  td { background: #2d0a0a !important; }
[data-color-mode="dark"] table.gdconf-dt tbody tr.gdconf-row--delayed   td { background: #2d1500 !important; }
[data-color-mode="dark"] table.gdconf-dt tbody tr.gdconf-row--postponed td { background: #1f1a00 !important; }

/* ── DataTables 2.x layout wrappers ──────────────────────────────────────── */

/* The layout API generates .dt-container > .dt-layout-row > .dt-layout-cell */

.gdconf-data-table-block .dt-container {
	font-size: 13px;
	font-family: inherit;
}

/* Controls bar (top + bottom) — tight, compact row */
.gdconf-data-table-block .dt-layout-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 12px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

/* Bottom controls row: no top border, reversed border position */
.gdconf-data-table-block .dt-layout-row:last-child {
	border-bottom: none;
	border-top: 1px solid #e2e8f0;
}

/* Row that wraps the actual table — zero padding, no background */
.gdconf-data-table-block .dt-layout-row:has(.dt-layout-full) {
	padding: 0;
	background: none;
	border: none;
}

.gdconf-data-table-block .dt-layout-cell {
	display: flex;
	align-items: center;
}
.gdconf-data-table-block .dt-layout-start { justify-content: flex-start; }
.gdconf-data-table-block .dt-layout-end   { justify-content: flex-end; }
.gdconf-data-table-block .dt-layout-full  { flex: 1 1 100%; }

/* ── Page-length selector ─────────────────────────────────────────────────── */

.gdconf-data-table-block .dt-length label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
	font-size: 12.5px;
	font-weight: 500;
	color: #64748b;
}
.gdconf-data-table-block .dt-length select {
	width: auto !important;      /* override any theme width: 100% */
	min-width: 58px;
	max-width: 90px;
	height: 28px;
	padding: 0 22px 0 8px;
	font-size: 12.5px;
	font-family: inherit;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 6px center;
	-webkit-appearance: none;
	appearance: none;
	color: #1e293b;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.gdconf-data-table-block .dt-length select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
	outline: none;
}

/* ── Info text ────────────────────────────────────────────────────────────── */

.gdconf-data-table-block .dt-info {
	font-size: 12.5px;
	color: #94a3b8;
	font-weight: 400;
	white-space: nowrap;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.gdconf-data-table-block .dt-paging {
	display: flex;
	align-items: center;
	gap: 3px;
	flex-wrap: wrap;
}

.gdconf-data-table-block .dt-paging-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	font-size: 13px;
	font-family: inherit;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 5px;
	cursor: pointer;
	color: #475569;
	transition: background 0.12s, border-color 0.12s, color 0.12s;
	line-height: 1;
}
.gdconf-data-table-block .dt-paging-button:hover:not(.disabled) {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #1e293b;
}
.gdconf-data-table-block .dt-paging-button.current {
	background: #2563eb;
	color: #fff;
	border-color: #2563eb;
	font-weight: 700;
}
.gdconf-data-table-block .dt-paging-button.current:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
}
.gdconf-data-table-block .dt-paging-button.disabled {
	opacity: .35;
	cursor: default;
	pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	/* Reveal the toggle and collapse the panel until the user opens it. */
	.gdconf-dt-filter-toggle {
		display: flex;
	}
	.gdconf-data-table-block:not(.gdconf-filters-open) .gdconf-dt-filters {
		display: none;
	}
	.gdconf-filters-open .gdconf-dt-filters {
		animation: gdconf-filters-in .22s ease both;
	}

	.gdconf-dt-filters {
		gap: 12px;
		padding: 14px;
	}

	/* Two filters per row; search + reset span the full width. */
	.gdconf-dt-filter-item {
		min-width: calc(50% - 4px);
		flex: 1 1 calc(50% - 4px);
	}
	.gdconf-dt-filter-item--search {
		min-width: 100%;
		flex: 1 1 100%;
	}
	.gdconf-dt-filter-item--reset {
		flex: 1 1 100%;
	}
	.gdconf-dt-filter-item--reset .gdconf-dt-reset {
		width: 100%;
	}
	.gdconf-dt-filter-item label {
		font-size: 10px;
	}

	table.gdconf-dt thead th,
	table.gdconf-dt td {
		padding: 6px 8px;
		font-size: 12.5px;
	}

	.gdconf-data-table-block .dt-layout-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.gdconf-data-table-block .dt-layout-end {
		justify-content: flex-start;
	}
}

/* ── Mobile UX enhancements (DataTables Responsive — details:false) ───────── */
/*
 * On small screens DataTables silently hides lower-priority columns.
 * A subtle hint reminds users to tap a row to see full details in the modal.
 */

@media (max-width: 640px) {
	/* Tighter cells */
	table.gdconf-dt td,
	table.gdconf-dt thead th {
		padding: 5px 7px;
		font-size: 12.5px;
	}

	/* Logo scales down proportionally rather than jumping to a fixed size */
	.gdconf-dt-col-logo {
		width: calc(var(--dt-logo-h-mobile, 28px) * 2 + 8px) !important;
		min-width: calc(var(--dt-logo-h-mobile, 28px) * 2 + 8px);
		padding: 4px !important;
	}
	.gdconf-dt-logo {
		height: var(--dt-logo-h-mobile, 28px);
		max-width: calc(var(--dt-logo-h-mobile, 28px) * 2);
	}

	/* Tags carry the columns that responsive drops on narrow screens */
	.gdconf-dt-tag { font-size: 10px; padding: 0 6px; }

	/* Hint text below table: "tap row for details" */
	.gdconf-data-table-block::after {
		content: 'Tap any row for full details';
		display: block;
		text-align: center;
		font-size: 11px;
		color: #94a3b8;
		padding: 6px 0 2px;
		letter-spacing: .02em;
	}
}

@media (max-width: 640px) {
	[data-color-mode*="dark"] .gdconf-data-table-block::after {
		color: #475569;
	}
}

/* ==========================================================================
   Dark mode — Blocksy sets [data-color-mode="dark"] on <html>
   ========================================================================== */

[data-color-mode="dark"] .gdconf-data-table-block {
	color: #e2e8f0;
}

/* Filter bar */
[data-color-mode="dark"] .gdconf-dt-filters {
	background: #1e293b;
	border-color: #334155;
}
[data-color-mode="dark"] .gdconf-dt-filter-item label {
	color: #94a3b8;
}
[data-color-mode="dark"] .gdconf-dt-filter-select,
[data-color-mode="dark"] .gdconf-dt-search {
	background: #0f172a;
	border-color: #475569;
	color: #e2e8f0;
}
[data-color-mode="dark"] .gdconf-dt-filter-select:focus,
[data-color-mode="dark"] .gdconf-dt-search:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}
[data-color-mode="dark"] .gdconf-dt-reset {
	background: #1e293b;
	border-color: #475569;
	color: #94a3b8;
}
[data-color-mode="dark"] .gdconf-dt-reset:hover {
	background: #450a0a;
	border-color: #7f1d1d;
	color: #fca5a5;
}

/* Tag chips */
[data-color-mode="dark"] .gdconf-dt-tag {
	background: #1e293b;
	border-color: #334155;
	color: #94a3b8;
}

/* Mobile filter toggle */
[data-color-mode="dark"] .gdconf-dt-filter-toggle {
	background: #1e293b;
	border-color: #334155;
	color: #e2e8f0;
}

/* Table wrapper */
[data-color-mode="dark"] table.gdconf-dt {
	background: #0f172a;
}
[data-color-mode="dark"] table.gdconf-dt thead th {
	background: #1e293b;
	color: #94a3b8;
	border-bottom-color: #334155 !important;
}
[data-color-mode="dark"] table.gdconf-dt thead th.dt-orderable-asc:hover,
[data-color-mode="dark"] table.gdconf-dt thead th.dt-orderable-desc:hover {
	background: #263348;
}
[data-color-mode="dark"] table.gdconf-dt thead th.dt-ordering-asc,
[data-color-mode="dark"] table.gdconf-dt thead th.dt-ordering-desc {
	color: #60a5fa;
}
[data-color-mode="dark"] table.gdconf-dt tbody td {
	border-bottom-color: #1e293b !important;
}
[data-color-mode="dark"] table.gdconf-dt td {
	color: #e2e8f0;
}
[data-color-mode="dark"] table.gdconf-dt tbody tr:nth-child(even) td {
	background: #111827;
}
[data-color-mode="dark"] table.gdconf-dt tbody tr:hover td {
	background: #1e3a5f;
}

/* DT controls */
[data-color-mode="dark"] .gdconf-data-table-block .dt-layout-row {
	background: #1e293b;
	border-bottom-color: #334155;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-layout-row:last-child {
	border-top-color: #334155;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-layout-row:has(.dt-layout-full) {
	background: none;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-length label {
	color: #94a3b8;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-length select {
	background-color: #0f172a;
	border-color: #475569;
	color: #e2e8f0;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-info {
	color: #475569;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-paging-button {
	background: #1e293b;
	border-color: #334155;
	color: #94a3b8;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-paging-button:hover:not(.disabled) {
	background: #263348;
	border-color: #475569;
	color: #e2e8f0;
}
[data-color-mode="dark"] .gdconf-data-table-block .dt-paging-button.current {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

/* URL link */
[data-color-mode="dark"] .gdconf-dt-link {
	background: #1e3a5f;
	border-color: #1d4ed8;
	color: #93c5fd;
}
[data-color-mode="dark"] .gdconf-dt-link:hover {
	background: #1e40af;
	border-color: #3b82f6;
}

/* Badges — darken backgrounds slightly */
[data-color-mode="dark"] .gdconf-badge--scheduled  { background: #14532d; color: #86efac; }
[data-color-mode="dark"] .gdconf-badge--finished   { background: #1e293b; color: #94a3b8; }
[data-color-mode="dark"] .gdconf-badge--canceled,
[data-color-mode="dark"] .gdconf-badge--cancelled  { background: #450a0a; color: #fca5a5; }
[data-color-mode="dark"] .gdconf-badge--delayed    { background: #431407; color: #fdba74; }
[data-color-mode="dark"] .gdconf-badge--ongoing    { background: #1e3a5f; color: #93c5fd; }
[data-color-mode="dark"] .gdconf-badge--today      { background: #422006; color: #fde68a; }
[data-color-mode="dark"] .gdconf-badge--physical   { background: #2e1065; color: #c4b5fd; }
[data-color-mode="dark"] .gdconf-badge--virtual    { background: #0c4a6e; color: #7dd3fc; }
[data-color-mode="dark"] .gdconf-badge--hybrid     { background: #064e3b; color: #6ee7b7; }
[data-color-mode="dark"] .gdconf-badge--open       { background: #14532d; color: #86efac; }
[data-color-mode="dark"] .gdconf-badge--closed     { background: #1e293b; color: #94a3b8; }
[data-color-mode="dark"] .gdconf-badge--upcoming   { background: #1e3a5f; color: #93c5fd; }
[data-color-mode="dark"] .gdconf-badge--past       { background: #1e293b; color: #64748b; }
[data-color-mode="dark"] .gdconf-badge--b2b        { background: #2e1065; color: #c4b5fd; }
[data-color-mode="dark"] .gdconf-badge--b2c        { background: #500724; color: #fbcfe8; }
[data-color-mode="dark"] .gdconf-badge--b2b2c      { background: #3b0764; color: #e9d5ff; }
[data-color-mode="dark"] .gdconf-badge--everyone   { background: #064e3b; color: #6ee7b7; }
[data-color-mode="dark"] .gdconf-badge--new        { background: #14532d; color: #86efac; }

[data-color-mode="dark"] table.gdconf-dt tbody tr.gdconf-row--pinned   td { background: #292011 !important; }
[data-color-mode="dark"] table.gdconf-dt tbody tr.gdconf-row--featured td { background: #241f0f !important; }

/* ── Row detail modal (shared .gdconf-cal-popup classes) ─────────────────────
   Defined here so the modal works even when the calendar block is absent.
   If the calendar block IS on the page its identical rules just cascade cleanly.
   ─────────────────────────────────────────────────────────────────────────── */

.gdconf-cal-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-50% + 8px)) scale(.97);
	width: min(500px, calc(100svw - 32px));
	max-height: min(90svh, 640px);
	overflow-y: auto;
	overscroll-behavior: contain;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 4px 6px rgba(0,0,0,.06), 0 16px 40px rgba(0,0,0,.18);
	opacity: 0;
	transition: opacity .18s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.gdconf-cal-popup[open] {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}
.gdconf-cal-popup.is-closing {
	opacity: 0;
	transform: translate(-50%, calc(-50% + 8px)) scale(.97);
}
.gdconf-cal-popup::backdrop {
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.gdconf-cal-popup__header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 18px 18px 14px;
	border-bottom: 1px solid #e2e8f0;
}
.gdconf-cal-popup__logo {
	width: 38px;
	height: 38px;
	object-fit: contain;
	border-radius: 5px;
	flex-shrink: 0;
	margin-top: 2px;
	background: #f8fafc;
}
.gdconf-cal-popup__header-text { flex: 1; min-width: 0; }
.gdconf-cal-popup__title {
	margin: 0;
	font-size: clamp(15px, 3.5cqw, 17px);
	font-weight: 700;
	color: #1e293b;
	line-height: 1.3;
}
.gdconf-cal-popup__close {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	font-size: 14px;
	color: #64748b;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .12s, color .12s;
}
.gdconf-cal-popup__close:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

.gdconf-cal-popup__body {
	padding: 14px 18px 4px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.gdconf-cal-popup__row {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 13px;
	color: #1e293b;
	line-height: 1.5;
}
.gdconf-cal-popup__icon { flex-shrink: 0; font-size: 14px; line-height: 1.5; width: 18px; text-align: center; }

.gdconf-cal-popup__badges { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0 4px; }

.gdconf-cal-popup__desc {
	font-size: 13px;
	color: #475569;
	line-height: 1.6;
	padding: 8px 0 4px;
	border-top: 1px solid #f1f5f9;
	border-bottom: 1px solid #f1f5f9;
	margin: 2px 0;
}
[data-color-mode="dark"] .gdconf-cal-popup__desc {
	color: #94a3b8;
	border-color: #1e293b;
}

.gdconf-cal-popup__footer {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	padding: 12px 18px 18px;
	border-top: 1px solid #e2e8f0;
	margin-top: 6px;
}
.gdconf-cal-popup__btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 44px;
	padding: 0 16px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	transition: filter .12s;
	border: 1px solid transparent;
	white-space: nowrap;
}
.gdconf-cal-popup__btn--primary {
	background: #2563eb;
	color: #fff;
	border-color: #2563eb;
}
.gdconf-cal-popup__btn--primary:hover { filter: brightness(1.1); color: #fff; text-decoration: none; }

@media (max-width: 600px) {
	.gdconf-cal-popup {
		top: auto; bottom: 0; left: 0; right: 0;
		width: 100%; max-width: 100%; max-height: 90svh;
		border-radius: 20px 20px 0 0;
		transform: translateY(calc(100% + 8px));
		transition: opacity .22s ease, transform .28s cubic-bezier(.32,.72,0,1);
	}
	.gdconf-cal-popup[open] { transform: translateY(0); }
	.gdconf-cal-popup.is-closing { transform: translateY(100%); }
	.gdconf-cal-popup::before {
		content: '';
		display: block;
		width: 40px;
		height: 4px;
		border-radius: 2px;
		background: #e2e8f0;
		margin: 10px auto -4px;
	}
	.gdconf-cal-popup__footer { flex-direction: column; }
	.gdconf-cal-popup__btn { width: 100%; justify-content: center; }
}

/* Dark mode for modal */
[data-color-mode="dark"] .gdconf-cal-popup {
	background: #1e293b;
	border-color: #334155;
	color: #e2e8f0;
}
[data-color-mode="dark"] .gdconf-cal-popup__header,
[data-color-mode="dark"] .gdconf-cal-popup__footer { border-color: #334155; }
[data-color-mode="dark"] .gdconf-cal-popup__title { color: #e2e8f0; }
[data-color-mode="dark"] .gdconf-cal-popup__row   { color: #e2e8f0; }
[data-color-mode="dark"] .gdconf-cal-popup__close { background: #0f172a; border-color: #334155; color: #94a3b8; }
[data-color-mode="dark"] .gdconf-cal-popup__logo  { background: #0f172a; }

/* ── Calendar picker ─────────────────────────────────────────────────────── */

.gdconf-cal-picker {
	position: relative;
}

.gdconf-cal-picker__menu {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	min-width: 210px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,.14);
	padding: 4px;
	z-index: 10;
}

.gdconf-cal-picker__opt {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 9px 12px;
	font-size: 13px;
	font-weight: 500;
	font-family: inherit;
	color: #1e293b;
	background: none;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	text-decoration: none;
	transition: background .12s;
	white-space: nowrap;
}
.gdconf-cal-picker__opt:hover {
	background: #f1f5f9;
	text-decoration: none;
	color: #1e293b;
}
.gdconf-cal-picker__opt span { font-size: 15px; flex-shrink: 0; }

[data-color-mode="dark"] .gdconf-cal-picker__menu {
	background: #1e293b;
	border-color: #334155;
}
[data-color-mode="dark"] .gdconf-cal-picker__opt { color: #e2e8f0; }
[data-color-mode="dark"] .gdconf-cal-picker__opt:hover { background: #263348; color: #e2e8f0; }

/* ── Notify-me / watch button ─────────────────────────────────────────────── */

.gdconf-cal-popup__btn--notify {
	background: transparent;
	border: 1px solid #e2e8f0;
	color: #475569;
}
.gdconf-cal-popup__btn--notify:hover,
.gdconf-cal-popup__btn--notify.is-active {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #2563eb;
}

.gdconf-cal-popup__btn--watching {
	background: #dcfce7;
	border: 1px solid transparent;
	color: #16a34a;
	cursor: default;
	font-size: 13px;
	padding: 7px 14px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.gdconf-watch-expand {
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	padding: 0 14px;
	background: #f8fafc;
	border: 1px solid transparent;
	border-radius: 8px;
	margin-top: 0;
	transition:
		max-height 220ms ease,
		opacity    180ms ease,
		padding    220ms ease,
		margin-top 220ms ease,
		border-color 220ms ease;
}
.gdconf-watch-expand.is-open {
	max-height: 140px;
	opacity: 1;
	padding: 12px 14px;
	margin-top: 8px;
	border-color: #e2e8f0;
}

.gdconf-watch-input-row {
	display: flex;
	gap: 8px;
}

.gdconf-watch-email {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	padding: 7px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #1e293b;
	font-family: inherit;
}
.gdconf-watch-email:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.gdconf-watch-note {
	font-size: 11px;
	color: #94a3b8;
	margin: 0;
}

[data-color-mode="dark"] .gdconf-cal-popup__btn--notify { border-color: #334155; color: #94a3b8; }
[data-color-mode="dark"] .gdconf-cal-popup__btn--notify:hover,
[data-color-mode="dark"] .gdconf-cal-popup__btn--notify.is-active { background: #1e3a5f; border-color: #1d4ed8; color: #93c5fd; }
[data-color-mode="dark"] .gdconf-cal-popup__btn--watching { background: #14532d; color: #86efac; }
[data-color-mode="dark"] .gdconf-watch-expand.is-open { background: #1e293b; border-color: #334155; }
[data-color-mode="dark"] .gdconf-watch-email { background: #0f172a; border-color: #334155; color: #f1f5f9; }
[data-color-mode="dark"] .gdconf-watch-email:focus { border-color: #2563eb; }

@media (max-width: 540px) {
	.gdconf-watch-input-row { flex-direction: column; }
}

/* ── Editor placeholder ───────────────────────────────────────────────────── */

.gdconf-dt-editor-preview {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px 28px;
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 10px;
	color: #475569;
}

.gdconf-dt-editor-icon .dashicons {
	font-size: 36px;
	width: 36px;
	height: 36px;
	color: #2563eb;
}

.gdconf-dt-editor-label {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

.gdconf-dt-editor-hint {
	margin-top: 4px;
	font-size: 12px;
	color: #94a3b8;
	font-weight: 400;
}
