/*
 * TDS Exhibitor Login — front-end styles.
 * Everything is scoped to .tdsexh and uses its own tokens, so it sits on top of
 * any theme without inheriting or fighting its form styles.
 */

.tdsexh {
	--tdsexh-bg: #ffffff;
	--tdsexh-fg: #1d2327;
	--tdsexh-muted: #646970;
	--tdsexh-border: #d5d8dc;
	--tdsexh-accent: #1c5d99;
	--tdsexh-accent-fg: #ffffff;
	--tdsexh-success-bg: #edfaef;
	--tdsexh-success-fg: #1c6b33;
	--tdsexh-error-bg: #fcefef;
	--tdsexh-error-fg: #a3202a;
	--tdsexh-warning-bg: #fdf6e3;
	--tdsexh-warning-fg: #8a6100;
	--tdsexh-radius: 6px;

	box-sizing: border-box;
	color: var(--tdsexh-fg);
	font-size: 16px;
	line-height: 1.5;
}

.tdsexh *,
.tdsexh *::before,
.tdsexh *::after {
	box-sizing: inherit;
}

/* ---------- Login ---------- */

.tdsexh-login {
	max-width: 26rem;
	margin: 0 auto;
}

.tdsexh-login-title {
	margin: 0 0 1rem;
	font-size: 1.4rem;
}

.tdsexh-form .tdsexh-field {
	margin-bottom: 1rem;
}

.tdsexh-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
}

.tdsexh-form input[type="text"],
.tdsexh-form input[type="email"],
.tdsexh-form input[type="url"],
.tdsexh-form input[type="search"],
.tdsexh-form input[type="password"],
.tdsexh-form input[type="number"],
.tdsexh-form input[type="date"],
.tdsexh-form input[type="file"],
.tdsexh-form select,
.tdsexh-form textarea {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	background: var(--tdsexh-bg);
	color: var(--tdsexh-fg);
	font: inherit;
	font-size: 0.95rem;
}

.tdsexh-form input:focus,
.tdsexh-form select:focus,
.tdsexh-form textarea:focus {
	outline: 2px solid var(--tdsexh-accent);
	outline-offset: 1px;
	border-color: var(--tdsexh-accent);
}

.tdsexh-form input[disabled] {
	background: #f3f4f5;
	cursor: not-allowed;
}

.tdsexh-field-inline label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 400;
}

.tdsexh-field-inline input[type="checkbox"] {
	width: auto;
	margin: 0;
}

.tdsexh-password-wrap {
	display: flex;
	gap: 0.4rem;
}

.tdsexh-password-wrap input {
	flex: 1 1 auto;
}

.tdsexh-toggle-password,
.tdsexh-generate-password {
	flex: 0 0 auto;
	padding: 0 0.75rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	background: #f6f7f7;
	color: var(--tdsexh-fg);
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

/* The honeypot must be invisible to people but reachable to naive bots. */
.tdsexh-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tdsexh-fineprint {
	margin-top: 1rem;
	color: var(--tdsexh-muted);
	font-size: 0.75rem;
}

.tdsexh-fineprint a {
	color: inherit;
}

/* ---------- Buttons ---------- */

.tdsexh-button {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	background: #f6f7f7;
	color: var(--tdsexh-fg);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.tdsexh-button:hover {
	background: #eceef0;
}

.tdsexh-button-primary {
	border-color: var(--tdsexh-accent);
	background: var(--tdsexh-accent);
	color: var(--tdsexh-accent-fg);
}

.tdsexh-button-primary:hover {
	background: #17497a;
	color: var(--tdsexh-accent-fg);
}

.tdsexh-button-link {
	border-color: transparent;
	background: transparent;
	color: var(--tdsexh-accent);
}

.tdsexh-button[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.tdsexh-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
	margin-top: 0.5rem;
}

/* ---------- Notices ---------- */

.tdsexh-notice {
	margin: 0 0 1rem;
	padding: 0.7rem 0.9rem;
	border-left: 4px solid var(--tdsexh-muted);
	border-radius: 4px;
	background: #f2f3f4;
	font-size: 0.92rem;
}

.tdsexh-notice-success {
	border-left-color: var(--tdsexh-success-fg);
	background: var(--tdsexh-success-bg);
	color: var(--tdsexh-success-fg);
}

.tdsexh-notice-error {
	border-left-color: var(--tdsexh-error-fg);
	background: var(--tdsexh-error-bg);
	color: var(--tdsexh-error-fg);
}

.tdsexh-notice-warning {
	border-left-color: var(--tdsexh-warning-fg);
	background: var(--tdsexh-warning-bg);
	color: var(--tdsexh-warning-fg);
}

.tdsexh-notice code {
	padding: 0.05rem 0.3rem;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.07);
	font-size: 0.9em;
}

/* ---------- Dashboard ---------- */

.tdsexh-dashboard {
	max-width: 76rem;
	margin: 0 auto;
}

.tdsexh-dash-header {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.tdsexh-dash-title {
	margin: 0;
	font-size: 1.5rem;
}

.tdsexh-dash-sub {
	margin: 0.2rem 0 0;
	color: var(--tdsexh-muted);
	font-size: 0.85rem;
}

.tdsexh-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--tdsexh-border);
}

.tdsexh-tab {
	padding: 0.55rem 0.9rem;
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: var(--tdsexh-radius) var(--tdsexh-radius) 0 0;
	color: var(--tdsexh-muted);
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
}

.tdsexh-tab.is-active {
	border-color: var(--tdsexh-border);
	background: var(--tdsexh-bg);
	color: var(--tdsexh-fg);
	margin-bottom: -1px;
}

.tdsexh-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.tdsexh-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.tdsexh-filters input[type="search"] {
	min-width: 18rem;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	font: inherit;
	font-size: 0.9rem;
}

.tdsexh-filters select {
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	font: inherit;
	font-size: 0.9rem;
}

.tdsexh-toolbar-actions {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.tdsexh-count {
	color: var(--tdsexh-muted);
	font-size: 0.85rem;
}

.tdsexh-panel {
	padding: 1.25rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	background: var(--tdsexh-bg);
}

.tdsexh-panel-title {
	margin: 0 0 1rem;
	font-size: 1.15rem;
}

.tdsexh-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1.25rem;
}

.tdsexh-field-full {
	grid-column: 1 / -1;
}

.tdsexh-help {
	margin: 0.3rem 0 0;
	color: var(--tdsexh-muted);
	font-size: 0.8rem;
}

.tdsexh-required {
	color: var(--tdsexh-error-fg);
}

.tdsexh-fieldset {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
}

.tdsexh-fieldset legend {
	padding: 0 0.35rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.tdsexh-fieldset label {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 0.35rem;
	font-weight: 400;
	font-size: 0.9rem;
}

.tdsexh-portal-preview {
	margin: 0.5rem 0 1rem;
	padding: 0.6rem 0.75rem;
	border-radius: var(--tdsexh-radius);
	background: #f6f7f7;
	overflow-wrap: anywhere;
}

.tdsexh-portal-preview code {
	font-size: 0.8rem;
}

/* ---------- Tables ---------- */

.tdsexh-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
}

.tdsexh-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--tdsexh-bg);
	font-size: 0.9rem;
}

.tdsexh-table th,
.tdsexh-table td {
	padding: 0.65rem 0.8rem;
	border-bottom: 1px solid var(--tdsexh-border);
	text-align: left;
	vertical-align: top;
}

.tdsexh-table thead th {
	background: #f6f7f7;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.tdsexh-table tbody tr:last-child td {
	border-bottom: none;
}

.tdsexh-row-disabled {
	background: #fbfbfc;
}

.tdsexh-row-actions a {
	display: inline-block;
	margin-right: 0.7rem;
	font-size: 0.85rem;
	white-space: nowrap;
}

.tdsexh-danger {
	color: var(--tdsexh-error-fg);
}

.tdsexh-muted {
	color: var(--tdsexh-muted);
	font-size: 0.85rem;
}

.tdsexh-empty {
	padding: 2rem;
	border: 1px dashed var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	color: var(--tdsexh-muted);
	text-align: center;
}

.tdsexh-pill {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: #eceef0;
	color: var(--tdsexh-fg);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.tdsexh-pill-active {
	background: var(--tdsexh-success-bg);
	color: var(--tdsexh-success-fg);
}

.tdsexh-pill-disabled {
	background: var(--tdsexh-error-bg);
	color: var(--tdsexh-error-fg);
}

.tdsexh-pill-admin {
	background: #e7effa;
	color: var(--tdsexh-accent);
}

.tdsexh-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.tdsexh-stats li {
	font-size: 0.9rem;
}

.tdsexh-stats strong {
	display: block;
	font-size: 1.5rem;
}

.tdsexh-pagination {
	display: flex;
	gap: 0.35rem;
	margin-top: 1rem;
}

.tdsexh-pagination .page-numbers {
	padding: 0.35rem 0.65rem;
	border: 1px solid var(--tdsexh-border);
	border-radius: var(--tdsexh-radius);
	font-size: 0.85rem;
	text-decoration: none;
}

.tdsexh-pagination .page-numbers.current {
	border-color: var(--tdsexh-accent);
	background: var(--tdsexh-accent);
	color: var(--tdsexh-accent-fg);
}

.tdsexh-details {
	margin-top: 1.25rem;
	font-size: 0.9rem;
}

.tdsexh-details summary {
	cursor: pointer;
	font-weight: 600;
}

.tdsexh-column-list {
	margin: 0.75rem 0 0;
	padding-left: 1.1rem;
}

.tdsexh-column-list li {
	margin-bottom: 0.2rem;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

/* ---------- Small screens ---------- */

@media (max-width: 782px) {
	.tdsexh-form-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.tdsexh-filters input[type="search"] {
		min-width: 0;
		flex: 1 1 100%;
	}

	.tdsexh-table thead {
		display: none;
	}

	.tdsexh-table,
	.tdsexh-table tbody,
	.tdsexh-table tr,
	.tdsexh-table td {
		display: block;
		width: 100%;
	}

	.tdsexh-table tr {
		padding: 0.5rem 0;
		border-bottom: 1px solid var(--tdsexh-border);
	}

	.tdsexh-table td {
		display: flex;
		gap: 1rem;
		justify-content: space-between;
		border: none;
		padding: 0.3rem 0.8rem;
	}

	.tdsexh-table td::before {
		content: attr(data-label);
		flex: 0 0 40%;
		color: var(--tdsexh-muted);
		font-size: 0.75rem;
		font-weight: 700;
		text-transform: uppercase;
	}

	.tdsexh-row-actions {
		flex-wrap: wrap;
	}
}
