/* GlobalTech Client Support + Client Ticket Portal (port of the EGO eModule support.css and support-portal.css). */
/*!
 * EGO eModule — Client Support portal styles
 *
 * Everything is scoped under `.egoec-support` so active themes and
 * other plugins cannot bleed into the portal (and vice versa). Uses
 * CSS custom properties fed by the renderer so admins can theme
 * without touching this file.
 *
 * @package EGO_EModule_Custom
 */

/* ------------------------------------------------------------------ *
 * Design tokens (defaults; overridden inline by the renderer)
 * ------------------------------------------------------------------ */
.egoec-support {
	--egoec-sp-accent: #2563eb;
	--egoec-sp-accent-contrast: #ffffff;
	--egoec-sp-bg: #f8fafc;
	--egoec-sp-text: #0f172a;
	--egoec-sp-muted: rgba(15, 23, 42, 0.65);
	--egoec-sp-card-bg: #ffffff;
	--egoec-sp-border: rgba(15, 23, 42, 0.08);
	--egoec-sp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 30px -16px rgba(15, 23, 42, 0.25);
	--egoec-sp-radius-lg: 20px;
	--egoec-sp-radius-md: 14px;
	--egoec-sp-radius-sm: 10px;

	box-sizing: border-box;
	margin: 0;
	padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px);
	background: var(--egoec-sp-bg);
	color: var(--egoec-sp-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.egoec-support *,
.egoec-support *::before,
.egoec-support *::after {
	box-sizing: border-box;
}

.egoec-support-inner {
	max-width: 1200px;
	margin: 0 auto;
}

/* ------------------------------------------------------------------ *
 * Section header
 * ------------------------------------------------------------------ */
.egoec-support-header {
	max-width: 720px;
	margin: 0 auto clamp(24px, 3vw, 40px);
	text-align: center;
}
.egoec-support-title {
	margin: 0 0 10px;
	font-size: clamp(26px, 3.2vw, 38px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--egoec-sp-text);
}
.egoec-support-subtitle {
	margin: 0;
	font-size: clamp(15px, 1.6vw, 17px);
	line-height: 1.55;
	color: var(--egoec-sp-muted);
}

/* ------------------------------------------------------------------ *
 * Card grid — default "cards" layout
 * ------------------------------------------------------------------ */
.egoec-support-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: clamp(16px, 2vw, 24px);
	align-items: stretch;
}

.egoec-support-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: clamp(20px, 2vw, 28px);
	background: var(--egoec-sp-card-bg);
	border: 1px solid var(--egoec-sp-border);
	border-radius: var(--egoec-sp-radius-lg);
	box-shadow: var(--egoec-sp-shadow);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
	overflow: hidden;
}
.egoec-support-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(135deg, transparent 0%, transparent 70%, rgba(37, 99, 235, 0.06) 100%);
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}
.egoec-support-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06), 0 22px 40px -18px rgba(15, 23, 42, 0.35);
	border-color: rgba(15, 23, 42, 0.12);
}
.egoec-support-card:hover::before { opacity: 1; }

/* Featured card (Remote Support) — stronger visual hierarchy. */
.egoec-support-card.is-featured {
	background: linear-gradient(135deg, var(--egoec-sp-accent) 0%, color-mix(in srgb, var(--egoec-sp-accent) 70%, #000 30%) 100%);
	color: var(--egoec-sp-accent-contrast);
	border-color: transparent;
}
.egoec-support-card.is-featured .egoec-support-card-title,
.egoec-support-card.is-featured .egoec-support-card-desc,
.egoec-support-card.is-featured .egoec-support-card-value {
	color: var(--egoec-sp-accent-contrast);
}
.egoec-support-card.is-featured .egoec-support-card-desc {
	opacity: 0.92;
}
/* Fallback for browsers without color-mix (older Safari / in-app). */
@supports not (background: color-mix(in srgb, red, blue)) {
	.egoec-support-card.is-featured {
		background: var(--egoec-sp-accent);
	}
}

/* Icon */
.egoec-support-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--egoec-sp-radius-md);
	background: color-mix(in srgb, var(--egoec-sp-accent) 12%, transparent);
	color: var(--egoec-sp-accent);
	flex: none;
}
@supports not (background: color-mix(in srgb, red, blue)) {
	.egoec-support-card-icon {
		background: rgba(37, 99, 235, 0.12);
	}
}
.egoec-support-card-icon svg {
	width: 24px;
	height: 24px;
	display: block;
}
.egoec-support-card.is-featured .egoec-support-card-icon {
	background: rgba(255, 255, 255, 0.16);
	color: var(--egoec-sp-accent-contrast);
}

/* Card body */
.egoec-support-card-body {
	flex: 1 1 auto;
	min-width: 0;
}
.egoec-support-card-title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--egoec-sp-text);
}
.egoec-support-card-desc {
	margin: 0 0 8px;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--egoec-sp-muted);
}
.egoec-support-card-value {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--egoec-sp-text);
	word-break: break-word;
}

/* Action area */
.egoec-support-card-action {
	display: flex;
	justify-content: flex-start;
	margin-top: auto;
}

.egoec-support-card-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: var(--egoec-sp-radius-sm);
	border: 1px solid var(--egoec-sp-border);
	background: transparent;
	color: var(--egoec-sp-text);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
	cursor: pointer;
}
.egoec-support-card-btn svg {
	width: 16px;
	height: 16px;
	flex: none;
	transition: transform .2s ease;
}
.egoec-support-card-btn:hover,
.egoec-support-card-btn:focus-visible {
	background: var(--egoec-sp-accent);
	color: var(--egoec-sp-accent-contrast);
	border-color: var(--egoec-sp-accent);
	text-decoration: none;
	outline: none;
}
.egoec-support-card-btn:hover svg {
	transform: translateX(2px);
}
.egoec-support-card-btn:focus-visible {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--egoec-sp-accent) 30%, transparent);
}

/* Featured card uses an inverted button. */
.egoec-support-card.is-featured .egoec-support-card-btn {
	background: var(--egoec-sp-accent-contrast);
	color: var(--egoec-sp-accent);
	border-color: var(--egoec-sp-accent-contrast);
}
.egoec-support-card.is-featured .egoec-support-card-btn:hover,
.egoec-support-card.is-featured .egoec-support-card-btn:focus-visible {
	background: rgba(255, 255, 255, 0.92);
	color: var(--egoec-sp-accent);
	border-color: rgba(255, 255, 255, 0.92);
}

/* Disabled / admin warning card */
.egoec-support-card.is-disabled {
	background: color-mix(in srgb, var(--egoec-sp-card-bg) 92%, #000 8%);
	border-style: dashed;
	border-color: rgba(180, 83, 9, 0.35);
}
.egoec-support-card-warn {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	padding: 8px 10px;
	border-radius: var(--egoec-sp-radius-sm);
	background: rgba(250, 204, 21, 0.16);
	color: #92400e;
	font-size: 12.5px;
	line-height: 1.35;
}
.egoec-support-card-warn svg {
	width: 16px;
	height: 16px;
	flex: none;
	color: #b45309;
	margin-top: 1px;
}

/* ------------------------------------------------------------------ *
 * Layout: grid — tighter, more columns
 * ------------------------------------------------------------------ */
.egoec-support-layout-grid .egoec-support-grid {
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
}
.egoec-support-layout-grid .egoec-support-card {
	padding: 18px;
	gap: 12px;
	border-radius: var(--egoec-sp-radius-md);
}
.egoec-support-layout-grid .egoec-support-card-icon {
	width: 40px;
	height: 40px;
}
.egoec-support-layout-grid .egoec-support-card-title {
	font-size: 16px;
}

/* ------------------------------------------------------------------ *
 * Layout: inline — horizontal strip (good for footers)
 * ------------------------------------------------------------------ */
.egoec-support-layout-inline .egoec-support-grid {
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
}
.egoec-support-layout-inline .egoec-support-card {
	flex-direction: row;
	align-items: center;
	padding: 12px 16px;
	gap: 12px;
	border-radius: var(--egoec-sp-radius-sm);
}
.egoec-support-layout-inline .egoec-support-card-icon {
	width: 36px;
	height: 36px;
}
.egoec-support-layout-inline .egoec-support-card-title {
	font-size: 14.5px;
	margin: 0;
}
.egoec-support-layout-inline .egoec-support-card-desc,
.egoec-support-layout-inline .egoec-support-card-value {
	display: none;
}
.egoec-support-layout-inline .egoec-support-card-action {
	margin-left: auto;
	margin-top: 0;
}

/* ------------------------------------------------------------------ *
 * Theme: dark
 * ------------------------------------------------------------------ */
.egoec-support-theme-dark {
	--egoec-sp-bg: #0b1220;
	--egoec-sp-text: #f1f5f9;
	--egoec-sp-muted: rgba(226, 232, 240, 0.72);
	--egoec-sp-card-bg: #111a2e;
	--egoec-sp-border: rgba(255, 255, 255, 0.08);
	--egoec-sp-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.6);
}
.egoec-support-theme-dark .egoec-support-card-btn {
	color: var(--egoec-sp-text);
	border-color: rgba(255, 255, 255, 0.16);
}
.egoec-support-theme-dark .egoec-support-card.is-disabled {
	background: rgba(250, 204, 21, 0.04);
	border-color: rgba(250, 204, 21, 0.25);
}

/* ------------------------------------------------------------------ *
 * Theme: minimal — borderless, no shadows
 * ------------------------------------------------------------------ */
.egoec-support-theme-minimal {
	--egoec-sp-shadow: none;
	--egoec-sp-border: transparent;
	--egoec-sp-card-bg: transparent;
}
.egoec-support-theme-minimal .egoec-support-card {
	border: 0;
	box-shadow: none;
	padding: 20px;
}
.egoec-support-theme-minimal .egoec-support-card:hover {
	transform: none;
	box-shadow: none;
	background: rgba(15, 23, 42, 0.03);
}

/* ------------------------------------------------------------------ *
 * ScreenConnect-style remote widget
 *
 * When `remote_style="screenconnect"` the Remote Support card renders
 * this specialized widget — a teal gradient outer with a cream-white
 * panel inside, red top stripe, "Build Installer" CTA row, and a
 * "Join with a code" form. Palette is driven by four custom properties
 * set inline by the renderer so admins can retune it per shortcode.
 * ------------------------------------------------------------------ */
.egoec-support-card-sc {
	--egoec-sc-bg-start: #052f36;
	--egoec-sc-bg-end:   #1a8d97;
	--egoec-sc-card-bg:  #f6f3ee;
	--egoec-sc-accent:   #d13c2c;
	--egoec-sc-ink:      #1b1f22;
	--egoec-sc-muted:    rgba(27, 31, 34, 0.78);

	/* Override the featured card's gradient with the widget's teal. */
	background: linear-gradient(180deg, var(--egoec-sc-bg-start) 0%, var(--egoec-sc-bg-end) 100%) !important;
	padding: clamp(24px, 3vw, 36px) !important;
	color: #ffffff;
	border: 0 !important;
}
.egoec-support-card-sc::before {
	display: none;
}
.egoec-support-card-sc:hover {
	transform: none;
}

.egoec-sc {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	height: 100%;
	width: 100%;
}

.egoec-sc-panel {
	position: relative;
	width: 100%;
	max-width: 360px;
	margin: 0 auto;
	padding: 24px 24px 26px;
	background: var(--egoec-sc-card-bg);
	border-radius: 8px;
	color: var(--egoec-sc-ink);
	box-shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

/* Red top stripe, like the reference */
.egoec-sc-stripe {
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--egoec-sc-accent);
	pointer-events: none;
}

/* "Build" and "Join" headings */
.egoec-sc-heading {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--egoec-sc-ink);
	line-height: 1.1;
}
.egoec-sc-heading .egoec-sc-pre {
	color: var(--egoec-sc-accent);
	font-weight: 700;
}
.egoec-sc-heading .egoec-sc-rest {
	color: var(--egoec-sc-ink);
	font-weight: 400;
	margin-left: 3px;
}

/* Build Installer block */
.egoec-sc-block-build {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 4px 0 16px;
	margin: 4px 0 12px;
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(27, 31, 34, 0.08);
	transition: color .2s ease;
}
.egoec-sc-block-build .egoec-sc-block-copy {
	flex: 1 1 auto;
	min-width: 0;
}
.egoec-sc-block-build:hover,
.egoec-sc-block-build:focus-visible {
	outline: none;
}
.egoec-sc-block-build:hover .egoec-sc-arrow-primary,
.egoec-sc-block-build:focus-visible .egoec-sc-arrow-primary {
	transform: translateX(2px);
	filter: brightness(1.05);
}

/* Descriptive paragraph (e.g. "Install a client on the local machine…") */
.egoec-sc-desc {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--egoec-sc-muted);
	max-width: 42ch;
}
.egoec-sc-desc-warn {
	color: #8b3a1a;
	font-style: italic;
}

/* Round arrow buttons (primary red + secondary grey, like reference) */
.egoec-sc-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex: none;
	color: #ffffff;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.egoec-sc-arrow svg {
	width: 18px;
	height: 18px;
	display: block;
}
.egoec-sc-arrow-primary {
	background: var(--egoec-sc-accent);
	box-shadow: 0 6px 14px -6px rgba(209, 60, 44, 0.55);
}

/* Join with a code block */
.egoec-sc-block-join {
	padding-top: 4px;
}
.egoec-sc-join-form {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}
.egoec-sc-join-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(27, 31, 34, 0.14);
	border-radius: 3px;
	background: #ffffff;
	color: var(--egoec-sc-ink);
	font-size: 16px; /* 16px min prevents iOS auto-zoom on focus */
	line-height: 1.2;
	font-family: inherit;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.egoec-sc-join-input:focus {
	outline: none;
	border-color: var(--egoec-sc-accent);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(209, 60, 44, 0.18);
}
.egoec-sc-join-input::placeholder {
	color: rgba(27, 31, 34, 0.45);
}
.egoec-sc-join-name {
	flex-basis: 42%;
}
.egoec-sc-join-message {
	flex: 1 0 100%;
	min-height: 18px;
	margin: 0;
	color: var(--egoec-sc-ink);
	font-size: 13px;
	line-height: 1.35;
	opacity: .78;
}
.egoec-sc-join-message.is-error {
	color: #b42318;
	opacity: 1;
}
.egoec-sc-join-message.is-success {
	color: #047857;
	opacity: 1;
}

.egoec-sc-join-submit {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(27, 31, 34, 0.18);
	color: #ffffff;
	cursor: pointer;
	flex: none;
	transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.egoec-sc-join-submit svg {
	width: 18px;
	height: 18px;
	display: block;
}
.egoec-sc-join-submit:hover,
.egoec-sc-join-submit:focus-visible {
	background: var(--egoec-sc-accent);
	transform: translateX(1px);
	box-shadow: 0 6px 14px -6px rgba(209, 60, 44, 0.55);
	outline: none;
}
.egoec-sc-join-submit.is-loading {
	cursor: wait;
	opacity: .75;
}

/* Admin-only disabled state for the widget (host URL missing, etc.) */
.egoec-sc-block.is-disabled {
	opacity: 0.85;
	pointer-events: none;
}

/* ------------------------------------------------------------------ *
 * Installer password gate (popup flow)
 *
 * The visible CTA is a button styled to be visually indistinguishable
 * from the normal Build Installer anchor — visitors should not sense a
 * gate until they click. The password prompt lives inside a modal that
 * support.js opens on click. Palette reuses the widget's teal + red
 * tokens so the modal feels native to the ScreenConnect chrome.
 * ------------------------------------------------------------------ */

/* Trigger button — neutralize default <button> styling so it matches
 * the .egoec-sc-block-build anchor it replaces. */
.egoec-sc-block-build-trigger {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(27, 31, 34, 0.08);
	font: inherit;
	color: inherit;
	text-align: left;
	width: 100%;
	cursor: pointer;
	/* Re-apply the same layout rules as .egoec-sc-block-build (selector
	 * already contributes the shared parts; this just keeps parity). */
}
.egoec-sc-block-build-trigger:hover,
.egoec-sc-block-build-trigger:focus-visible {
	outline: none;
	background: transparent;
}
.egoec-sc-block-build-trigger:focus-visible {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--egoec-sc-accent, #d13c2c) 25%, transparent);
	border-radius: 6px;
}
@supports not (background: color-mix(in srgb, red, black)) {
	.egoec-sc-block-build-trigger:focus-visible {
		box-shadow: 0 0 0 3px rgba(209, 60, 44, 0.25);
	}
}
/* The span-based heading inside the button must render block-level so
 * it lays out identically to the <h3> version used in the anchor. */
.egoec-sc-heading-inline {
	display: block;
}
.egoec-sc-desc-inline {
	display: block;
	margin: 0;
	font-size: 13.5px;
	line-height: 1.45;
	color: rgba(15, 42, 49, 0.82);
}

/* Modal shell — full-viewport, high z-index so it escapes slider/
 * stacking context if the widget is placed inside a carousel. */
.egoec-sc-pw-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
	box-sizing: border-box;
}
.egoec-sc-pw-modal[hidden] {
	display: none !important;
}
.egoec-sc-pw-modal-backdrop {
	position: absolute;
	inset: 0;
	/* Backdrop picks up the darker widget gradient color so the scrim
	 * harmonizes with the widget palette (teal by default, but whatever
	 * the admin configured in "Widget colors → Gradient top"). */
	background: color-mix(in srgb, var(--egoec-sc-bg-start, #052f36) 62%, transparent);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	z-index: 0;
	animation: egoec-sc-pw-fade 180ms ease-out both;
}
@supports not (background: color-mix(in srgb, red, black)) {
	.egoec-sc-pw-modal-backdrop {
		background: rgba(5, 47, 54, 0.62);
	}
}
.egoec-sc-pw-modal-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	background: var(--egoec-sc-card-bg, #f6f3ee);
	color: #0f2a31;
	border-radius: 14px;
	padding: 28px 26px 24px;
	/* Drop shadow tinted with the widget's darker gradient color so the
	 * modal reads as part of the ScreenConnect chrome. */
	box-shadow:
		0 24px 70px -20px color-mix(in srgb, var(--egoec-sc-bg-start, #052f36) 50%, transparent),
		0 2px 8px rgba(0, 0, 0, 0.08);
	animation: egoec-sc-pw-pop 220ms cubic-bezier(.2,.8,.2,1) both;
	outline: none;
}
@supports not (background: color-mix(in srgb, red, black)) {
	.egoec-sc-pw-modal-panel {
		box-shadow: 0 24px 70px -20px rgba(5, 47, 54, 0.5), 0 2px 8px rgba(0, 0, 0, 0.08);
	}
}
/* Thin red stripe at the top of the panel echoes the widget's accent. */
.egoec-sc-pw-modal-panel::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--egoec-sc-accent, #d13c2c);
	border-radius: 14px 14px 0 0;
}
.egoec-sc-pw-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: #0f2a31;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity .15s ease, background .15s ease;
}
.egoec-sc-pw-modal-close:hover,
.egoec-sc-pw-modal-close:focus-visible {
	opacity: 1;
	background: rgba(15, 42, 49, 0.08);
	outline: none;
}
.egoec-sc-pw-modal-close svg {
	pointer-events: none;
}
.egoec-sc-pw-modal-title {
	margin: 4px 0 16px;
	font-size: 26px;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: #0f2a31;
	line-height: 1.1;
	padding-right: 36px; /* leave room for close button */
}
.egoec-sc-pw-modal-title .egoec-sc-pre {
	color: var(--egoec-sc-accent, #d13c2c);
	font-weight: 700;
}
.egoec-sc-pw-modal-title .egoec-sc-rest {
	color: #0f2a31;
	font-weight: 400;
	margin-left: 3px;
}

/* Body lock while the modal is open — support.js toggles this class. */
body.egoec-sc-pw-modal-open {
	overflow: hidden;
}

@keyframes egoec-sc-pw-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes egoec-sc-pw-pop {
	from { opacity: 0; transform: translateY(8px) scale(.98); }
	to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ------------------------------------------------------------------ *
 * Password form (used inside the modal AND inside the noscript block)
 * ------------------------------------------------------------------ */
.egoec-sc-pw-form {
	display: block;
	margin: 0;
}
.egoec-sc-pw-prompt {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #0f2a31;
	margin: 0 0 8px;
}
.egoec-sc-pw-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
	flex-wrap: nowrap;
}
.egoec-sc-pw-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
	color: #0f2a31;
	background: #ffffff;
	border: 1px solid rgba(15, 42, 49, 0.18);
	border-radius: 10px;
	outline: none;
	box-shadow: inset 0 1px 2px rgba(15, 42, 49, 0.06);
	transition: border-color .18s ease, box-shadow .18s ease;
}
.egoec-sc-pw-input::placeholder {
	color: rgba(15, 42, 49, 0.4);
}
.egoec-sc-pw-input:focus {
	border-color: var(--egoec-sc-accent, #d13c2c);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--egoec-sc-accent, #d13c2c) 18%, transparent);
}
@supports not (background: color-mix(in srgb, red, black)) {
	.egoec-sc-pw-input:focus {
		box-shadow: 0 0 0 3px rgba(209, 60, 44, 0.18);
	}
}
.egoec-sc-pw-submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 0 18px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #ffffff;
	background: var(--egoec-sc-accent, #d13c2c);
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
	transition: background .18s ease, transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.egoec-sc-pw-submit:hover,
.egoec-sc-pw-submit:focus-visible {
	background: color-mix(in srgb, var(--egoec-sc-accent, #d13c2c) 88%, #000000);
	outline: none;
	transform: translateY(-1px);
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}
@supports not (background: color-mix(in srgb, red, black)) {
	.egoec-sc-pw-submit:hover,
	.egoec-sc-pw-submit:focus-visible {
		filter: brightness(0.92);
	}
}
.egoec-sc-pw-submit:active {
	transform: translateY(0);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.egoec-sc-pw-submit[disabled],
.egoec-sc-pw-submit.is-loading {
	opacity: 0.7;
	cursor: progress;
}
.egoec-sc-pw-submit-icon svg {
	width: 18px;
	height: 18px;
	pointer-events: none;
}
.egoec-sc-pw-message {
	min-height: 1.2em;
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #0f2a31;
}
.egoec-sc-pw-message.is-error {
	color: #b91c1c;
	font-weight: 600;
}
.egoec-sc-pw-message.is-success {
	color: #047857;
	font-weight: 600;
}
.egoec-sc-pw-hint {
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: rgba(15, 42, 49, 0.65);
}

/* No-JS fallback — show the form inline below the trigger instead of
 * leaving the visitor with a dead button. */
.egoec-sc-pw-nojs {
	margin-top: 14px;
	padding: 14px;
	background: color-mix(in srgb, var(--egoec-sc-bg-start, #052f36) 4%, transparent);
	border-radius: 10px;
}
@supports not (background: color-mix(in srgb, red, black)) {
	.egoec-sc-pw-nojs {
		background: rgba(5, 47, 54, 0.04);
	}
}

/* Narrow columns — stack the submit under the input so neither gets
 * squeezed to an unusable width. */
@media (max-width: 520px) {
	.egoec-sc-pw-row {
		flex-wrap: wrap;
	}
	.egoec-sc-pw-submit {
		width: 100%;
		justify-content: center;
	}
	.egoec-sc-pw-submit-label {
		flex: 1 1 auto;
		text-align: center;
	}
}

/* Reduced motion — drop modal animations. */
@media (prefers-reduced-motion: reduce) {
	.egoec-sc-pw-modal-backdrop,
	.egoec-sc-pw-modal-panel {
		animation: none !important;
	}
}

/* Responsive tweaks so the widget stays readable inside narrow columns */
@media (max-width: 480px) {
	.egoec-support-card-sc {
		padding: 22px !important;
	}
	.egoec-sc-panel {
		padding: 20px 20px 22px;
	}
	.egoec-sc-heading {
		font-size: 22px;
	}
	.egoec-sc-arrow {
		width: 40px;
		height: 40px;
	}
	.egoec-sc-join-input,
	.egoec-sc-join-submit {
		height: 42px;
	}
	.egoec-sc-join-name {
		flex-basis: 100%;
	}
	.egoec-sc-pw-input,
	.egoec-sc-pw-submit {
		height: 44px;
	}
}

/* Reduced motion: drop all widget transitions */
@media (prefers-reduced-motion: reduce) {
	.egoec-sc-block-build,
	.egoec-sc-arrow,
	.egoec-sc-join-submit,
	.egoec-sc-join-input,
	.egoec-sc-pw-submit,
	.egoec-sc-pw-input {
		transition: none;
	}
	.egoec-sc-block-build:hover .egoec-sc-arrow-primary,
	.egoec-sc-join-submit:hover,
	.egoec-sc-pw-submit:hover {
		transform: none;
	}
}

/* Print: flatten the widget */
@media print {
	.egoec-support-card-sc {
		background: #ffffff !important;
	}
	.egoec-sc-panel {
		box-shadow: none !important;
		border: 1px solid #cccccc;
	}
	.egoec-sc-arrow,
	.egoec-sc-join-submit {
		background: #000000 !important;
		box-shadow: none !important;
	}
}

/* ------------------------------------------------------------------ *
 * Standalone button (sub-shortcodes)
 * ------------------------------------------------------------------ */
.egoec-support-btn {
	--egoec-sp-accent: #2563eb;
	--egoec-sp-accent-contrast: #ffffff;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.15;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.egoec-support-btn svg { width: 16px; height: 16px; flex: none; }

.egoec-support-btn-sm { padding: 8px 12px; font-size: 13px; }
.egoec-support-btn-lg { padding: 14px 22px; font-size: 16px; }

.egoec-support-btn-primary {
	background: var(--egoec-sp-accent);
	color: var(--egoec-sp-accent-contrast);
	border-color: var(--egoec-sp-accent);
}
.egoec-support-btn-primary:hover,
.egoec-support-btn-primary:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--egoec-sp-accent) 60%, transparent);
	color: var(--egoec-sp-accent-contrast);
	outline: none;
}

.egoec-support-btn-secondary {
	background: transparent;
	color: var(--egoec-sp-accent);
	border-color: var(--egoec-sp-accent);
}
.egoec-support-btn-secondary:hover,
.egoec-support-btn-secondary:focus-visible {
	background: var(--egoec-sp-accent);
	color: var(--egoec-sp-accent-contrast);
	outline: none;
}

.egoec-support-btn-ghost {
	background: transparent;
	color: inherit;
	border-color: rgba(15, 23, 42, 0.15);
}
.egoec-support-btn-ghost:hover,
.egoec-support-btn-ghost:focus-visible {
	border-color: var(--egoec-sp-accent);
	color: var(--egoec-sp-accent);
	outline: none;
}

.egoec-support-btn.is-disabled {
	opacity: 0.6;
	cursor: not-allowed;
	border-style: dashed;
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding-top: 8px;
	padding-bottom: 8px;
}
.egoec-support-btn.is-disabled small {
	font-size: 11px;
	font-weight: 400;
	opacity: 0.85;
}

/* ------------------------------------------------------------------ *
 * Compact contact block
 * ------------------------------------------------------------------ */
.egoec-support-contact {
	--egoec-sp-accent: #2563eb;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 8px;
	margin: 0;
	background: transparent;
}
.egoec-support-contact-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.04);
	color: inherit;
	text-decoration: none;
	transition: background .2s ease, transform .2s ease;
}
.egoec-support-contact-item:hover,
.egoec-support-contact-item:focus-visible {
	background: color-mix(in srgb, var(--egoec-sp-accent) 12%, transparent);
	transform: translateY(-1px);
	outline: none;
}
@supports not (background: color-mix(in srgb, red, blue)) {
	.egoec-support-contact-item:hover { background: rgba(37, 99, 235, 0.12); }
}
.egoec-support-contact-item svg {
	width: 18px; height: 18px;
	color: var(--egoec-sp-accent);
	flex: none;
}
.egoec-support-contact-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
	display: block;
}
.egoec-support-contact-value {
	font-size: 14.5px;
	font-weight: 600;
	display: block;
}

/* ------------------------------------------------------------------ *
 * Admin-only warning surface (kept outside the portal scope so it
 * shows even when the portal bails early)
 * ------------------------------------------------------------------ */
.egoec-support-admin-warning {
	margin: 16px 0;
	padding: 12px 16px;
	border-radius: 10px;
	border: 1px dashed rgba(180, 83, 9, 0.45);
	background: rgba(250, 204, 21, 0.12);
	color: #92400e;
	font-size: 14px;
	line-height: 1.45;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 768px) {
	.egoec-support {
		padding: 36px 16px;
	}
	.egoec-support-grid { gap: 14px; }
	.egoec-support-card { padding: 20px; }
	.egoec-support-card-btn { width: 100%; justify-content: center; }
	.egoec-support-card-action { width: 100%; }
}
@media (max-width: 480px) {
	.egoec-support-layout-inline .egoec-support-card {
		flex-direction: column;
		align-items: flex-start;
	}
	.egoec-support-layout-inline .egoec-support-card-action {
		width: 100%;
		margin-left: 0;
	}
	.egoec-support-contact-item { width: 100%; }
}

/* ------------------------------------------------------------------ *
 * Reduced motion: respect user preference
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.egoec-support-card,
	.egoec-support-card-btn,
	.egoec-support-btn,
	.egoec-support-contact-item {
		transition: none;
	}
	.egoec-support-card:hover,
	.egoec-support-btn:hover,
	.egoec-support-contact-item:hover {
		transform: none;
	}
}

/* ------------------------------------------------------------------ *
 * Print: render as a plain list so the portal is still useful when
 * printed as part of a support document.
 * ------------------------------------------------------------------ */
@media print {
	.egoec-support {
		background: #ffffff;
		color: #000000;
		padding: 16px 0;
	}
	.egoec-support-card {
		border: 1px solid #cccccc !important;
		background: #ffffff !important;
		color: #000000 !important;
		box-shadow: none !important;
		break-inside: avoid;
	}
	.egoec-support-card.is-featured {
		background: #ffffff !important;
		color: #000000 !important;
	}
	.egoec-support-card-btn {
		border: 1px solid #333333 !important;
		color: #000000 !important;
		background: #ffffff !important;
	}
}

/**
 * Client Ticket Portal styles.
 *
 * Scoped under .egoec-cportal. Reuses the Client Support palette
 * (blue accent on light card surfaces) so the panel blends with the
 * [globaltech_client_support] cards it usually renders below.
 */

/**
 * The [hidden] attribute MUST win.
 *
 * The browser's `[hidden] { display: none }` lives in the user-agent
 * stylesheet, so ANY author rule that sets `display` beats it — our own
 * `.egoec-cportal-btn { display: inline-block }` did exactly that, which
 * made el.hidden = true a no-op for every button (the "Manage team" and
 * "New ticket" buttons stayed visible for users who must not see them).
 * The theme around the portal can do the same, so this is !important on
 * purpose: visibility here is an access-control decision, not styling.
 */
.egoec-cportal [hidden],
.egoec-cportal[hidden] {
	display: none !important;
}

.egoec-cportal {
	max-width: 860px;
	margin: 2.5rem auto;
	padding: 0 1rem;
	color: #0f172a;
	font-size: 16px;
	line-height: 1.5;
}

.egoec-cportal-header { text-align: center; margin-bottom: 1.5rem; }
.egoec-cportal-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 .35rem; }
.egoec-cportal-subtitle { color: #475569; margin: 0; }

.egoec-cportal-admin-note,
.egoec-cportal-noscript {
	background: #fef3c7;
	border: 1px solid #f59e0b;
	border-radius: 8px;
	padding: .75rem 1rem;
	margin: 1rem auto;
	max-width: 860px;
	font-size: .95rem;
}

.egoec-cportal-msg {
	border-radius: 8px;
	padding: .7rem 1rem;
	margin: 0 0 1rem;
	font-size: .95rem;
}
.egoec-cportal-msg.is-ok    { background: #ecfdf5; border: 1px solid #10b981; color: #065f46; }
.egoec-cportal-msg.is-error { background: #fef2f2; border: 1px solid #ef4444; color: #991b1b; }

.egoec-cportal-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
	padding: 1.25rem 1.25rem 1.4rem;
	margin: 0 0 1.25rem;
}

.egoec-cportal-form { max-width: 460px; margin-left: auto; margin-right: auto; }
.egoec-cportal-label { display: block; font-weight: 600; font-size: .9rem; margin: .9rem 0 .3rem; }
.egoec-cportal-label:first-child { margin-top: 0; }

.egoec-cportal-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: .6rem .75rem;
	font-size: 1rem;
	background: #fff;
	color: #0f172a;
}
.egoec-cportal-input:focus { outline: 2px solid #2563eb; outline-offset: 1px; border-color: #2563eb; }

.egoec-cportal-btn {
	display: inline-block;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: .6rem 1.2rem;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	margin-top: 1rem;
	transition: background .15s ease;
}
.egoec-cportal-btn:hover { background: #1d4ed8; }
.egoec-cportal-btn:disabled { opacity: .6; cursor: wait; }
.egoec-cportal-btn-ghost { background: transparent; color: #2563eb; border: 1px solid #cbd5e1; }
.egoec-cportal-btn-ghost:hover { background: #f1f5f9; }

.egoec-cportal-hint { color: #475569; font-size: .92rem; margin: 0 0 .4rem; }
.egoec-cportal-links { margin: .9rem 0 0; font-size: .88rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.egoec-cportal-links a { color: #2563eb; text-decoration: none; }
.egoec-cportal-links a:hover { text-decoration: underline; }

.egoec-cportal-company-list { display: grid; gap: .6rem; }
.egoec-cportal-company-btn {
	text-align: left;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: .8rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: #0f172a;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.egoec-cportal-company-btn:hover { border-color: #2563eb; background: #eff6ff; }

.egoec-cportal-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 0 0 1rem;
}
.egoec-cportal-bar .egoec-cportal-btn { margin-top: 0; }
.egoec-cportal-company { font-weight: 700; font-size: 1.05rem; }
.egoec-cportal-switch { margin-left: .75rem; font-size: .85rem; color: #2563eb; text-decoration: none; }
.egoec-cportal-switch:hover { text-decoration: underline; }
.egoec-cportal-back { color: #2563eb; text-decoration: none; font-size: .92rem; }
.egoec-cportal-back:hover { text-decoration: underline; }

.egoec-cportal-h3 { margin: 0 0 .6rem; font-size: 1.15rem; }
.egoec-cportal-h4 { margin: 1.4rem 0 .6rem; font-size: 1rem; }

.egoec-cportal-filters {
	display: flex;
	gap: .6rem;
	margin: 0 0 .9rem;
}
.egoec-cportal-search { flex: 1 1 auto; min-width: 0; }
.egoec-cportal-status-filter { flex: 0 0 auto; width: auto; max-width: 45%; }

.egoec-cportal-list { display: grid; gap: .7rem; }

.egoec-cportal-ticket {
	display: block;
	width: 100%;
	text-align: left;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: .85rem 1rem;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
	font: inherit;
	color: inherit;
}
.egoec-cportal-ticket:hover { border-color: #2563eb; box-shadow: 0 2px 6px rgba(37, 99, 235, .12); }

/* Resolved / Closed / Canceled tickets render grayed-out. */
.egoec-cportal-ticket.is-terminal { background: #f1f5f9; color: #64748b; }
.egoec-cportal-ticket.is-terminal .egoec-cportal-ticket-summary { color: #64748b; }

.egoec-cportal-ticket-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .3rem; }
.egoec-cportal-ticket-num { font-weight: 700; font-size: .9rem; color: #475569; }
.egoec-cportal-ticket-summary { font-weight: 600; }
.egoec-cportal-ticket-meta { font-size: .82rem; color: #64748b; margin-top: .25rem; }

.egoec-cportal-status {
	display: inline-block;
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	padding: .15rem .7rem;
	font-size: .78rem;
	font-weight: 700;
	white-space: nowrap;
}
.egoec-cportal-status.is-terminal { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

.egoec-cportal-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }

/* Four-stage progress bar (Open -> In progress -> Resolved -> Closed). */
.egoec-cportal-progress { display: flex; margin: 1.1rem 0 .4rem; }
.egoec-cportal-step { flex: 1; text-align: center; position: relative; }
.egoec-cportal-step::before {
	content: '';
	position: absolute;
	top: 8px;
	left: -50%;
	width: 100%;
	height: 3px;
	background: #e2e8f0;
}
.egoec-cportal-step:first-child::before { display: none; }
.egoec-cportal-step.is-done::before,
.egoec-cportal-step.is-current::before { background: #2563eb; }
.egoec-cportal-step-dot {
	position: relative;
	z-index: 1;
	display: block;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #e2e8f0;
	margin: 0 auto .35rem;
	border: 2px solid #ffffff;
	box-shadow: 0 0 0 1px #cbd5e1;
}
.egoec-cportal-step.is-done .egoec-cportal-step-dot { background: #2563eb; box-shadow: 0 0 0 1px #2563eb; }
/* Current stage: FILLED (it has been reached) plus a soft halo to mark
   it as the stage in progress. */
.egoec-cportal-step.is-current .egoec-cportal-step-dot { background: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, .25); }
.egoec-cportal-step-label { font-size: .72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .3px; }
.egoec-cportal-step.is-done .egoec-cportal-step-label,
.egoec-cportal-step.is-current .egoec-cportal-step-label { color: #1d4ed8; }
.egoec-cportal-progress.is-canceled .egoec-cportal-step-dot { background: #e2e8f0; box-shadow: 0 0 0 1px #cbd5e1; }
.egoec-cportal-progress.is-canceled .egoec-cportal-step-label { color: #cbd5e1; text-decoration: line-through; }
.egoec-cportal-detail-desc { white-space: pre-wrap; color: #334155; margin: .6rem 0 0; }
.egoec-cportal-detail-meta { color: #64748b; font-size: .85rem; margin: .6rem 0 0; }

/* Team access (Ticket Admin). */
.egoec-cportal-nosites {
	margin: .9rem 0;
	padding: 14px 16px;
	border: 1px solid #fcd34d;
	border-left: 4px solid #f59e0b;
	border-radius: 8px;
	background: #fffbeb;
	color: #78350f;
	font-size: .9rem;
	line-height: 1.5;
}
.egoec-cportal-team-search {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
}
.egoec-cportal-team-search .egoec-cportal-input { flex: 1; }
.egoec-cportal-team-count { font-size: .82rem; color: #64748b; white-space: nowrap; }

.egoec-cportal-member {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	margin: 0 0 8px;
	background: #ffffff;
}
.egoec-cportal-member.is-open {
	border-color: #2563eb;
	box-shadow: 0 2px 10px rgba(37, 99, 235, .12);
	padding-bottom: 14px;
}
.egoec-cportal-member-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.egoec-cportal-member.is-open .egoec-cportal-member-head { margin-bottom: .6rem; }
.egoec-cportal-member-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.egoec-cportal-member-sum { font-size: .8rem; color: #475569; white-space: nowrap; }
.egoec-cportal-member-sum.is-warn { color: #b45309; font-weight: 600; }

.egoec-cportal-site-tools { display: flex; gap: 14px; margin: .2rem 0 .5rem; }
.egoec-cportal-linkbtn {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-size: .82rem;
	color: #2563eb;
	cursor: pointer;
	text-decoration: underline;
}
.egoec-cportal-linkbtn:hover { color: #1d4ed8; }
.egoec-cportal-member-email { font-size: .8rem; color: #64748b; }
.egoec-cportal-role {
	flex: none;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	background: #e0f2fe;
	color: #075985;
}
.egoec-cportal-role.is-admin { background: #ede9fe; color: #5b21b6; }
.egoec-cportal-site-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 6px;
	margin: .6rem 0 .8rem;
}
.egoec-cportal-site-check {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: .85rem;
	cursor: pointer;
}
.egoec-cportal-site-check:hover { border-color: #2563eb; background: #f8fafc; }
.egoec-cportal-member-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.egoec-cportal-member-status { font-size: .82rem; }
.egoec-cportal-member-status.is-ok { color: #15803d; }
.egoec-cportal-member-status.is-error { color: #b91c1c; }

/* One-time code input: big, spaced digits so a 6-digit code is easy to
   read back from the email. */
.egoec-cportal-code-input {
	font-size: 1.5rem;
	letter-spacing: .5em;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Pagination (above and below the ticket list). */
.egoec-cportal-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: .75rem 0;
}
.egoec-cportal-page-btn {
	padding: 6px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #ffffff;
	color: #0f172a;
	font: inherit;
	font-size: .85rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.egoec-cportal-page-btn:hover:not(:disabled) { border-color: #2563eb; background: #eff6ff; }
.egoec-cportal-page-btn:disabled { cursor: default; opacity: .45; }
.egoec-cportal-page-btn.is-current {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
	opacity: 1;
}
.egoec-cportal-page-dots { color: #64748b; padding: 0 2px; }
.egoec-cportal-page-info { margin-left: auto; font-size: .8rem; color: #64748b; }

/* Attachment thumbnails + lightbox. */
.egoec-cportal-thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin: .9rem 0 .2rem; }
.egoec-cportal-thumb {
	display: block;
	width: 116px;
	padding: 6px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	cursor: zoom-in;
	font: inherit;
	text-align: center;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.egoec-cportal-thumb:hover { border-color: #2563eb; box-shadow: 0 2px 8px rgba(37, 99, 235, .18); transform: translateY(-1px); }
.egoec-cportal-thumb img {
	display: block;
	width: 100%;
	height: 82px;
	object-fit: cover;
	border-radius: 6px;
	background: #f1f5f9;
}
.egoec-cportal-thumb-name {
	display: block;
	margin-top: .35rem;
	font-size: .68rem;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.egoec-cportal-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(15, 23, 42, .88);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.egoec-cportal-lightbox[hidden] { display: none; }
.egoec-cportal-lightbox-inner { position: relative; max-width: 94vw; max-height: 92vh; text-align: center; }
.egoec-cportal-lightbox-img {
	max-width: 94vw;
	max-height: 82vh;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	background: #ffffff;
}
.egoec-cportal-lightbox-cap { margin-top: .7rem; color: #e2e8f0; font-size: .9rem; word-break: break-all; }
.egoec-cportal-lightbox-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: #ffffff;
	color: #0f172a;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.egoec-cportal-lightbox-close:hover { background: #f1f5f9; }

@media (max-width: 600px) {
	.egoec-cportal-lightbox-close { top: 6px; right: 6px; }
}

.egoec-cportal-notes { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.egoec-cportal-note {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: .7rem .9rem;
}
.egoec-cportal-note.is-customer { background: #eff6ff; border-color: #bfdbfe; }
.egoec-cportal-note-head { font-size: .8rem; color: #64748b; font-weight: 600; margin-bottom: .25rem; }
.egoec-cportal-note-body { white-space: pre-wrap; font-size: .95rem; }

.egoec-cportal-empty { color: #64748b; text-align: center; padding: 1rem 0; }

.egoec-cportal-row { display: flex; gap: .75rem; align-items: center; }

/* Duplicate-ticket alert (AI check before creating). */
.egoec-cportal-dup {
	background: #fffbeb;
	border: 1px solid #f59e0b;
	border-radius: 10px;
	padding: 1rem 1.1rem;
	margin: 0 0 1.25rem;
}
.egoec-cportal-dup-title { margin: 0 0 .35rem; font-weight: 700; color: #92400e; }
.egoec-cportal-dup-hint { margin: 0 0 .75rem; font-size: .92rem; color: #92400e; }
.egoec-cportal-dup-ticket {
	display: block;
	width: 100%;
	text-align: left;
	background: #ffffff;
	border: 1px solid #fcd34d;
	border-radius: 8px;
	padding: .65rem .9rem;
	margin: 0 0 .5rem;
	font: inherit;
	font-weight: 600;
	color: #0f172a;
	cursor: pointer;
	transition: border-color .15s ease;
}
.egoec-cportal-dup-ticket:hover { border-color: #f59e0b; background: #fffdf5; }
.egoec-cportal-dup-anyway { margin-top: .35rem; }

/* Email gate rendered inside [globaltech_client_support]. */
.egoec-cportal-gate { max-width: 560px; }
.egoec-cportal-gate .egoec-cportal-form { max-width: none; }
.egoec-cportal-gate-row { display: flex; gap: .6rem; align-items: stretch; }
.egoec-cportal-gate-row .egoec-cportal-input { flex: 1 1 auto; min-width: 0; }
.egoec-cportal-gate-row .egoec-cportal-btn { margin-top: 0; white-space: nowrap; }

@media (max-width: 600px) {
	.egoec-cportal-bar { flex-direction: column; align-items: stretch; }
	.egoec-cportal-bar > div { display: flex; gap: .5rem; flex-wrap: wrap; }
	.egoec-cportal-detail-head { flex-direction: column; }
	.egoec-cportal-filters { flex-direction: column; }
	.egoec-cportal-status-filter { max-width: 100%; }
	.egoec-cportal-gate-row { flex-direction: column; }
}

/* Helper kept from the WordPress core stylesheet (used by the installer password label). */
.egoec-sc-pw-modal .screen-reader-text,
.egoec-sc-pw-nojs .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Ticket Center fallback (GTOS credentials missing): visible heading + contact card. */
.gt-portal--fallback { min-height: 240px; }
.gt-portal--fallback .egoec-cportal-title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.egoec-cportal-fallback { max-width: 560px; margin-left: auto; margin-right: auto; text-align: center; }
.egoec-cportal-fallback-text { margin: 0; color: #334155; }
.egoec-cportal-fallback-text a { color: var(--gt-primary, #6e29f6); font-weight: 600; text-decoration: underline; }
.egoec-cportal-fallback .egoec-cportal-btn { text-decoration: none; background: var(--gt-primary, #6e29f6); }
.egoec-cportal-fallback .egoec-cportal-btn:hover { background: color-mix(in srgb, var(--gt-primary, #6e29f6) 82%, #000); }

/* ------------------------------------------------------------------ *
 * Local demo mode ribbon (rendered only when APP_ENV=local and PORTAL_DEMO=1, see Portal\Demo)
 * ------------------------------------------------------------------ */
.egoec-cportal-demo {
	margin: 0 0 16px;
	padding: 14px 16px;
	background: #fffbeb;
	border: 1px dashed #d97706;
	border-radius: 12px;
	color: #78350f;
	font-size: 14px;
	line-height: 1.5;
}
.egoec-cportal-demo p { margin: 0 0 8px; }
.egoec-cportal-demo p:last-child { margin-bottom: 0; }
.egoec-cportal-demo-title { font-size: 15px; letter-spacing: .02em; }
.egoec-cportal-demo-accounts { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.egoec-cportal-demo-accounts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.egoec-cportal-demo-accounts span { font-size: 13px; opacity: .85; }
.egoec-cportal-demo-fill {
	appearance: none;
	background: #fff;
	border: 1px solid #d97706;
	border-radius: 999px;
	color: #78350f;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 2px 12px;
	max-width: 100%;
	overflow-wrap: anywhere;
	text-align: left;
}
.egoec-cportal-demo-fill:hover,
.egoec-cportal-demo-fill:focus-visible { background: #fef3c7; outline: 2px solid #d97706; outline-offset: 1px; }
.egoec-cportal-demo-code { padding: 10px 12px; background: #fff; border: 1px solid #d97706; border-radius: 10px; }
.egoec-cportal-demo-code[hidden] { display: none; }
.egoec-cportal-demo-code-value { font-size: 22px; letter-spacing: .25em; font-variant-numeric: tabular-nums; color: #92400e; }

/* ================================================================== *
 * Portal polish: layout, tap targets, states, accessibility.
 * Appended last so it refines the base rules above. Blue family kept
 * on purpose: it is the look of the live WordPress ticket portal.
 * ================================================================== */
.egoec-cportal {
	--cp-blue: #2563eb;
	--cp-blue-dark: #1d4ed8;
	--cp-ink: #0f172a;
	--cp-muted: #475569;
	--cp-meta: #526071;
	--cp-line: #dbe3ee;
	--cp-danger: #b91c1c;
	scroll-margin-top: 96px;
	font-family: inherit;
}
.egoec-cportal *, .egoec-cportal *::before, .egoec-cportal *::after { box-sizing: border-box; }
.egoec-cportal button, .egoec-cportal input, .egoec-cportal select, .egoec-cportal textarea { font-family: inherit; }

.egoec-cportal-title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); line-height: 1.2; overflow-wrap: anywhere; }
.egoec-cportal-subtitle { max-width: 52ch; margin-left: auto; margin-right: auto; }

/* Visible keyboard focus everywhere. */
.egoec-cportal a:focus-visible,
.egoec-cportal button:focus-visible,
.egoec-cportal select:focus-visible,
.egoec-cportal [tabindex]:focus-visible,
.egoec-cportal input[type="checkbox"]:focus-visible {
	outline: 3px solid var(--cp-blue);
	outline-offset: 2px;
	border-radius: 8px;
}
.egoec-cportal [tabindex="-1"]:focus { outline: none; }
.egoec-cportal-input:focus,
.egoec-cportal-input:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 0; border-color: var(--cp-blue); }

/* Status / feedback banner. */
.egoec-cportal-msg { display: flex; align-items: flex-start; gap: .6rem; padding: .8rem 1rem; line-height: 1.45; scroll-margin-top: 96px; overflow-wrap: anywhere; }
.egoec-cportal-msg::before { content: ''; flex: none; width: 1.25rem; height: 1.25rem; margin-top: .05rem; border-radius: 50%; background: currentColor; opacity: .9; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.egoec-cportal-msg.is-ok::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1a9 9 0 100 18 9 9 0 000-18zm4.3 6.7l-5 5a1 1 0 01-1.4 0l-2.2-2.2a1 1 0 111.4-1.4l1.5 1.5 4.3-4.3a1 1 0 111.4 1.4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1a9 9 0 100 18 9 9 0 000-18zm4.3 6.7l-5 5a1 1 0 01-1.4 0l-2.2-2.2a1 1 0 111.4-1.4l1.5 1.5 4.3-4.3a1 1 0 111.4 1.4z'/%3E%3C/svg%3E"); }
.egoec-cportal-msg.is-error::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1a9 9 0 100 18 9 9 0 000-18zm0 4a1 1 0 011 1v4a1 1 0 11-2 0V6a1 1 0 011-1zm0 8.5a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1a9 9 0 100 18 9 9 0 000-18zm0 4a1 1 0 011 1v4a1 1 0 11-2 0V6a1 1 0 011-1zm0 8.5a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z'/%3E%3C/svg%3E"); }
.egoec-cportal-msg.is-loading { background: #f1f5f9; border: 1px solid var(--cp-line); color: #334155; }
.egoec-cportal-msg.is-loading::before { background: none; -webkit-mask: none; mask: none; border: 2.5px solid #94a3b8; border-top-color: var(--cp-blue); animation: egoec-cp-spin .8s linear infinite; }
@keyframes egoec-cp-spin { to { transform: rotate(360deg); } }

/* Cards and forms. */
.egoec-cportal-card { border-color: var(--cp-line); border-radius: 14px; padding: 1.4rem 1.4rem 1.5rem; }
.egoec-cportal-form { max-width: none; }
.egoec-cportal-form[data-view="email"],
.egoec-cportal-form[data-view="password"],
.egoec-cportal-form[data-view="logincode"],
.egoec-cportal-form[data-view="setpw"] { max-width: 480px; }
.egoec-cportal-label { font-size: .95rem; margin: 1.1rem 0 .4rem; color: var(--cp-ink); }
.egoec-cportal-req { color: var(--cp-danger); font-weight: 700; }
.egoec-cportal-input { min-height: 46px; padding: .65rem .85rem; font-size: 1rem; line-height: 1.4; border-color: #b6c2d2; border-radius: 10px; }
textarea.egoec-cportal-input { min-height: 120px; resize: vertical; }
.egoec-cportal-input::placeholder { color: #64748b; opacity: 1; }
.egoec-cportal-input[aria-invalid="true"] { border-color: var(--cp-danger); background: #fffafa; }
.egoec-cportal-input[aria-invalid="true"]:focus { outline-color: rgba(185, 28, 28, .3); }
.egoec-cportal-field-error { display: flex; gap: .4rem; align-items: flex-start; margin: .4rem 0 0; font-size: .9rem; line-height: 1.4; font-weight: 600; color: var(--cp-danger); overflow-wrap: anywhere; }
.egoec-cportal-field-error::before { content: '!'; flex: none; width: 1.1rem; height: 1.1rem; margin-top: .1rem; border-radius: 50%; background: var(--cp-danger); color: #fff; font-size: .75rem; line-height: 1.1rem; text-align: center; font-weight: 800; }
select.egoec-cportal-input { padding-right: 2.2rem; appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .9rem center; cursor: pointer; text-overflow: ellipsis; }
.egoec-cportal-hint { line-height: 1.5; margin: .5rem 0 0; }
.egoec-cportal-form > .egoec-cportal-hint:first-child { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.egoec-cportal-h3 { font-size: 1.2rem; line-height: 1.3; overflow-wrap: anywhere; margin: 0 0 .75rem; }
.egoec-cportal-h4 { font-size: 1.05rem; margin: 1.6rem 0 .7rem; }

/* File picker: a real button, 44px tall. */
.egoec-cportal-file { padding: .5rem; cursor: pointer; font-size: 1rem; color: var(--cp-muted); background: #f8fafc; border-style: dashed; }
.egoec-cportal-file::file-selector-button {
	min-height: 36px; margin-right: .8rem; padding: .4rem 1rem; border: 1px solid #b6c2d2; border-radius: 8px;
	background: #fff; color: var(--cp-blue-dark); font: inherit; font-weight: 600; cursor: pointer;
}
.egoec-cportal-file:hover { border-color: var(--cp-blue); background: #eff6ff; }

/* Buttons: 44px targets. */
.egoec-cportal-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	min-height: 44px; padding: .65rem 1.3rem; font-size: 1rem; line-height: 1.2; border-radius: 10px;
	background: var(--cp-blue); color: #fff; text-align: center; margin-top: 1.1rem;
}
.egoec-cportal-btn:hover { background: var(--cp-blue-dark); }
.egoec-cportal-btn:active { transform: translateY(1px); }
.egoec-cportal-btn:disabled { opacity: .65; cursor: progress; }
.egoec-cportal-btn-ghost { background: #fff; color: var(--cp-blue-dark); border: 1px solid #b6c2d2; }
.egoec-cportal-btn-ghost:hover { background: #eff6ff; border-color: var(--cp-blue); }
.egoec-cportal-form[data-view="email"] > .egoec-cportal-btn,
.egoec-cportal-form[data-view="password"] > .egoec-cportal-btn,
.egoec-cportal-form[data-view="logincode"] > .egoec-cportal-btn,
.egoec-cportal-form[data-view="setpw"] > .egoec-cportal-btn { width: 100%; }
.egoec-cportal-row { flex-wrap: wrap; align-items: center; }
.egoec-cportal-row .egoec-cportal-btn { margin-top: 1.1rem; }
.egoec-cportal-links { margin-top: .6rem; font-size: .95rem; gap: .25rem 1.5rem; }
.egoec-cportal-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--cp-blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.egoec-cportal-code-input { font-size: 1.6rem; letter-spacing: .4em; padding-left: .4em; }

/* Company picker. */
.egoec-cportal-company-btn { min-height: 52px; border-radius: 10px; font-size: 1.05rem; }
.egoec-cportal-company-btn:focus-visible { outline: 3px solid var(--cp-blue); outline-offset: 2px; }

/* Toolbar. */
.egoec-cportal-bar { gap: .75rem 1rem; margin-bottom: 1.1rem; }
.egoec-cportal-bar-who { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .9rem; min-width: 0; }
.egoec-cportal-bar-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.egoec-cportal-bar .egoec-cportal-btn { margin-top: 0; }
.egoec-cportal-company { font-size: 1.15rem; overflow-wrap: anywhere; }
.egoec-cportal-switch { display: inline-flex; align-items: center; min-height: 40px; margin-left: 0; font-size: .95rem; color: var(--cp-blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.egoec-cportal-back {
	display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .9rem 0 .6rem; margin-left: -.6rem;
	border-radius: 10px; font-size: 1rem; font-weight: 600; color: var(--cp-blue-dark); text-decoration: none;
}
.egoec-cportal-back:hover { background: #eff6ff; text-decoration: none; }

/* Filters + count. */
.egoec-cportal-filters { gap: .75rem; margin-bottom: .6rem; }
.egoec-cportal-status-filter { min-width: 190px; }
.egoec-cportal-count { margin: 0 0 .7rem; font-size: .92rem; color: var(--cp-meta); }

/* Ticket list: one row per ticket on wide screens. */
.egoec-cportal-list { gap: .65rem; transition: opacity .15s ease; }
.egoec-cportal-list.is-loading { opacity: .45; pointer-events: none; }
.egoec-cportal-ticket {
	display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; grid-template-areas: "num sum status" "num meta status";
	column-gap: 1rem; row-gap: .15rem; align-items: center; min-height: 64px; padding: .9rem 1.1rem;
	border-color: var(--cp-line); border-radius: 12px; border-left: 4px solid var(--cp-line);
}
.egoec-cportal-ticket:hover { border-left-color: var(--cp-blue); }
.egoec-cportal-ticket:has(.is-waiting) { border-left-color: #d97706; }
.egoec-cportal-ticket:focus-visible { outline: 3px solid var(--cp-blue); outline-offset: 2px; }
.egoec-cportal-ticket.is-terminal { background: #f1f5f9; color: #334155; }
.egoec-cportal-ticket.is-terminal .egoec-cportal-ticket-summary { color: #3f4b5c; font-weight: 500; }
.egoec-cportal-ticket-head { display: contents; }
.egoec-cportal-ticket-num { grid-area: num; font-size: .95rem; color: var(--cp-muted); }
.egoec-cportal-ticket .egoec-cportal-status { grid-area: status; justify-self: end; }
.egoec-cportal-ticket-summary { grid-area: sum; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.egoec-cportal-ticket-meta { grid-area: meta; margin: 0; font-size: .85rem; color: var(--cp-meta); }
.egoec-cportal-ticket.is-terminal .egoec-cportal-ticket-meta { color: #475569; }

/* Status badges (AA contrast, colour family per stage). */
.egoec-cportal-status { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; padding: .25rem .8rem; font-size: .8rem; line-height: 1.3; }
.egoec-cportal-status.is-progress { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.egoec-cportal-status.is-waiting { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.egoec-cportal-status.is-terminal { background: #e8edf3; color: #3f4b5c; border-color: #cbd5e1; }

/* Empty state. */
.egoec-cportal-empty { margin: 0; padding: 2rem 1rem; border: 1px dashed #b6c2d2; border-radius: 12px; background: #f8fafc; color: var(--cp-muted); }
.egoec-cportal-list > .egoec-cportal-empty-cta { justify-self: center; margin-top: .25rem; }
.egoec-cportal-notes > .egoec-cportal-empty { padding: 1.2rem 1rem; }

/* Pagination. */
.egoec-cportal-pager { gap: .4rem; margin: 1rem 0; }
.egoec-cportal-page-btn { min-width: 44px; min-height: 44px; padding: .4rem .9rem; font-size: .95rem; border-radius: 10px; border-color: #b6c2d2; }
.egoec-cportal-page-btn:focus-visible { outline: 3px solid var(--cp-blue); outline-offset: 2px; }
.egoec-cportal-page-btn.is-current { background: var(--cp-blue-dark); border-color: var(--cp-blue-dark); }
.egoec-cportal-page-btn:disabled:not(.is-current) { opacity: .5; }
.egoec-cportal-page-dots { color: var(--cp-meta); }
.egoec-cportal-page-info { font-size: .9rem; color: var(--cp-meta); }

/* Detail. */
.egoec-cportal-detail-head { align-items: flex-start; gap: .6rem 1rem; }
.egoec-cportal-detail-head .egoec-cportal-h3 { flex: 1 1 280px; min-width: 0; margin: 0; }
.egoec-cportal-detail-head .egoec-cportal-status { margin-top: .25rem; }
.egoec-cportal-progress { margin: 1.3rem 0 .6rem; }
.egoec-cportal-step { min-width: 0; padding: 0 .15rem; }
.egoec-cportal-step-label { display: block; font-size: .72rem; line-height: 1.25; color: var(--cp-meta); overflow-wrap: anywhere; }
.egoec-cportal-step.is-done .egoec-cportal-step-label,
.egoec-cportal-step.is-current .egoec-cportal-step-label { color: #1e40af; }
.egoec-cportal-progress.is-canceled .egoec-cportal-step-label { color: #64748b; }
.egoec-cportal-detail-desc { margin-top: 1rem; line-height: 1.6; overflow-wrap: anywhere; color: #1e293b; }
.egoec-cportal-detail-meta { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid #edf1f6; font-size: .9rem; color: var(--cp-meta); }

/* Notes. */
.egoec-cportal-notes { gap: .7rem; }
.egoec-cportal-note { padding: .85rem 1rem; border-radius: 12px; overflow-wrap: anywhere; }
.egoec-cportal-note.is-customer { background: #eff6ff; border-color: #bfdbfe; }
.egoec-cportal-note-head { color: #475569; font-size: .85rem; }
.egoec-cportal-note-body { font-size: 1rem; line-height: 1.55; }

/* Attachment chips. */
.egoec-cportal-thumbs { gap: .6rem; }
.egoec-cportal-thumb { width: 124px; border-color: var(--cp-line); }
.egoec-cportal-thumb:focus-visible { outline: 3px solid var(--cp-blue); outline-offset: 2px; }
.egoec-cportal-thumb-name { font-size: .78rem; line-height: 1.3; color: var(--cp-meta); white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip; }
.egoec-cportal-lightbox-close { width: 44px; height: 44px; }
.egoec-cportal-lightbox-close:focus-visible { outline: 3px solid var(--cp-blue); outline-offset: 2px; }

/* Team. */
.egoec-cportal-team-search { gap: .6rem 1rem; }
.egoec-cportal-team-count { font-size: .9rem; color: var(--cp-meta); }
.egoec-cportal-member { border-color: var(--cp-line); border-radius: 12px; padding: .9rem 1rem; }
.egoec-cportal-member-email { display: inline-block; font-size: .88rem; color: var(--cp-meta); overflow-wrap: anywhere; }
.egoec-cportal-member-head > div:first-child { min-width: 0; }
.egoec-cportal-member-right { gap: .6rem .9rem; }
.egoec-cportal-member-right .egoec-cportal-btn { margin-top: 0; min-height: 44px; }
.egoec-cportal-role { font-size: .75rem; padding: .25rem .7rem; }
.egoec-cportal-member-sum { font-size: .9rem; color: var(--cp-muted); }
.egoec-cportal-member-sum.is-warn { color: #92400e; }
.egoec-cportal-site-tools { gap: .5rem 1rem; flex-wrap: wrap; }
.egoec-cportal-linkbtn { min-height: 40px; padding: 0 .4rem; font-size: .92rem; color: var(--cp-blue-dark); }
.egoec-cportal-site-check { min-height: 44px; font-size: .95rem; border-radius: 10px; border-color: var(--cp-line); }
.egoec-cportal-site-check input { width: 20px; height: 20px; flex: none; accent-color: var(--cp-blue); }
.egoec-cportal-member-actions .egoec-cportal-btn { margin-top: 0; }
.egoec-cportal-member-status { font-size: .92rem; }
.egoec-cportal-member-status.is-ok { color: #166534; font-weight: 600; }
.egoec-cportal-member-status.is-error { color: var(--cp-danger); font-weight: 600; }
.egoec-cportal-nosites { border-radius: 12px; font-size: .95rem; }

/* Duplicate alert. */
.egoec-cportal-dup { border-radius: 12px; }
.egoec-cportal-dup-ticket { min-height: 44px; }
.egoec-cportal-dup-title, .egoec-cportal-dup-hint { color: #78350f; }

/* Gate. */
.egoec-cportal-gate-row .egoec-cportal-btn { margin-top: 0; min-height: 46px; }
.egoec-cportal-gate .egoec-cportal-label { margin-top: 0; }

/* Demo ribbon chips: bigger targets. */
.egoec-cportal-demo-fill { min-height: 32px; padding: 4px 14px; }
.egoec-cportal-demo-accounts span { opacity: 1; color: #78350f; }

/* Phones. */
@media (max-width: 600px) {
	.egoec-cportal { margin: 1.25rem auto 2rem; padding: 0 16px; }
	.egoec-cportal-card { padding: 1.1rem 1rem 1.2rem; border-radius: 12px; }
	.egoec-cportal-bar { flex-direction: column; align-items: stretch; }
	.egoec-cportal-bar .egoec-cportal-bar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
	.egoec-cportal-bar-actions .egoec-cportal-btn { width: 100%; }
	.egoec-cportal-bar-actions [data-action="new-ticket"] { grid-column: 1 / -1; }
	.egoec-cportal-bar-actions [data-action="logout"]:last-child { grid-column: auto; }
	.egoec-cportal-filters { flex-direction: column; gap: .6rem; }
	.egoec-cportal-status-filter { max-width: none; width: 100%; }
	.egoec-cportal-ticket { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num status" "sum sum" "meta meta"; row-gap: .3rem; padding: .85rem .9rem; }
	.egoec-cportal-detail-head { flex-direction: column; }
	.egoec-cportal-detail-head .egoec-cportal-h3 { flex-basis: auto; }
	.egoec-cportal-step-label { font-size: .66rem; letter-spacing: 0; }
	.egoec-cportal-pager { justify-content: center; }
	.egoec-cportal-page-info { flex: 1 0 100%; margin: .2rem 0 0; text-align: center; }
	.egoec-cportal-team-search { flex-direction: column; align-items: stretch; }
	.egoec-cportal-member-head { flex-direction: column; align-items: stretch; }
	.egoec-cportal-member-right { justify-content: flex-start; }
	.egoec-cportal-member-right .egoec-cportal-btn { width: 100%; order: 3; }
	.egoec-cportal-site-grid { grid-template-columns: 1fr; }
	.egoec-cportal-member-actions .egoec-cportal-btn { width: 100%; }
	.egoec-cportal-thumb { width: calc(50% - .3rem); }
	.egoec-cportal-file { font-size: 16px; }
	.egoec-cportal-file::file-selector-button { display: block; width: 100%; margin: 0 0 .5rem; }
	.egoec-cportal-gate-row .egoec-cportal-btn { width: 100%; max-width: 100%; white-space: normal; text-wrap: balance; overflow-wrap: anywhere; }
	/* Long forms: keep the submit buttons in reach. */
	.egoec-cportal-form[data-view="new-ticket"] .egoec-cportal-row {
		position: sticky; bottom: 0; z-index: 2; margin: 1rem -1rem -1.2rem; padding: .7rem 1rem 1rem; gap: .6rem;
		background: linear-gradient(to bottom, rgba(255, 255, 255, .92), #fff 30%); border-top: 1px solid #edf1f6; border-radius: 0 0 12px 12px;
	}
	.egoec-cportal-form[data-view="new-ticket"] .egoec-cportal-row .egoec-cportal-btn { flex: 1 1 0; margin-top: 0; }
}
@media (max-width: 380px) {
	.egoec-cportal { padding: 0 14px; }
	.egoec-cportal-code-input { letter-spacing: .3em; }
}
@media (prefers-reduced-motion: reduce) {
	.egoec-cportal *, .egoec-cportal *::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Demo ribbon on phones: the account list sits behind a toggle so the form stays in the first screen. */
.egoec-cportal-demo-toggle { display: none; }
@media (max-width: 767px) {
	.egoec-cportal-demo { margin: 0 0 12px; padding: 10px 12px; }
	.egoec-cportal-demo-title { font-size: 13px; line-height: 1.35; margin-bottom: 6px; }
	.egoec-cportal-demo-toggle {
		display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; margin: 0 0 6px;
		background: #fff; color: #78350f; border: 1px solid #d97706; border-radius: 999px;
		font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
	}
	.egoec-cportal-demo-toggle::after { content: "\25BE"; margin-left: 8px; font-size: 16px; line-height: 1; transition: transform .15s; }
	.egoec-cportal-demo.is-open .egoec-cportal-demo-toggle::after { transform: rotate(180deg); }
	.egoec-cportal-demo-body { display: none; }
	.egoec-cportal-demo.is-open .egoec-cportal-demo-body { display: block; margin-top: 4px; }
	.egoec-cportal-demo-body > p { font-size: 13px; }
}
