/**
 * Giant Support — client portal
 *
 * Brand tokens (--gsup-*) are injected inline from GSUP_Branding so the
 * palette stays in one place. Everything here is scoped under .gsup-portal
 * to avoid collisions with the theme.
 */

.gsup-portal {
	--gsup-radius: 18px;
	--gsup-radius-sm: 12px;
	--gsup-shadow: 0 12px 40px rgba(11, 11, 15, 0.08);
	--gsup-shadow-sm: 0 4px 16px rgba(11, 11, 15, 0.06);

	font-family: var(--gsup-font);
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 20px 80px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;

	/*
	 * The portal is a light panel that sits on the theme's dark page, so it
	 * sets its own background and text colour rather than inheriting. Without
	 * this, the theme's light-on-dark body colour cascades into cards that
	 * have a white background and the text disappears.
	 */
	background: var(--gsup-page, #F6F7FB);
	color: var(--gsup-ink);
	border-radius: var(--gsup-radius);
}

/* Every descendant inherits the portal's dark ink, overriding any
   light-on-dark colour the theme sets on body or main. */
.gsup-portal :where(p, span, div, li, dt, dd, td, th, label, time, code, strong, em, h1, h2, h3, h4, h5, h6) {
	color: inherit;
}

.gsup-portal *,
.gsup-portal *::before,
.gsup-portal *::after {
	box-sizing: border-box;
}

/* ---------- Typography ---------- */

.gsup-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gsup-ink-soft);
	margin-bottom: 12px;
}

.gsup-title {
	font-size: clamp(30px, 4.4vw, 50px);
	line-height: 1.06;
	font-weight: 700;
	letter-spacing: -0.03em;
	margin: 0 0 14px;
}

.gsup-title--ticket {
	font-size: clamp(24px, 3vw, 34px);
	margin-bottom: 0;
}

.gsup-gradient-text {
	background: var(--gsup-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.gsup-lede {
	font-size: 17px;
	line-height: 1.6;
	color: var(--gsup-ink-soft);
	margin: 0;
	max-width: 56ch;
}

.gsup-section-title {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gsup-ink-soft);
	margin: 0 0 16px;
}

/* ---------- Hero ---------- */

.gsup-hero {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
	padding: 20px 0 36px;
	border-bottom: 1px solid var(--gsup-border);
	margin-bottom: 36px;
}

.gsup-hero--compact {
	border-bottom: none;
	padding-bottom: 20px;
	margin-bottom: 20px;
}

.gsup-hero-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* Client switcher — only rendered for people who work with several clients. */
.gsup-client-switch {
	padding: 12px 18px;
	border: 1px solid var(--gsup-border);
	border-radius: 100px;
	background: var(--gsup-surface);
	color: var(--gsup-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	max-width: 240px;
}

.gsup-client-switch:focus {
	outline: none;
	border-color: var(--gsup-blue);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gsup-blue) 16%, transparent);
}

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

.gsup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 30px;
	border-radius: 100px;
	border: 2px solid transparent;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.4, 1.2), box-shadow 0.18s ease, opacity 0.18s ease;
	will-change: transform;
}

.gsup-btn--primary {
	color: #fff;
	background: var(--gsup-gradient);
	background-size: 200% 200%;
	box-shadow: 0 6px 20px rgba(111, 0, 189, 0.28);
}

.gsup-btn--primary:hover {
	transform: translateY(-2px);
	background-position: 100% 50%;
	box-shadow: 0 10px 28px rgba(111, 0, 189, 0.36);
	color: #fff;
}

.gsup-btn--ghost {
	color: var(--gsup-ink);
	background: transparent;
	border-color: var(--gsup-border);
}

.gsup-btn--ghost:hover {
	border-color: var(--gsup-blue);
	color: var(--gsup-blue-text);
	transform: translateY(-1px);
}

.gsup-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.gsup-link-btn {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--gsup-blue-text);
	text-decoration: underline;
	cursor: pointer;
}

.gsup-back {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: var(--gsup-ink-soft);
	text-decoration: none;
	margin: 8px 0 20px;
	transition: color 0.18s ease, transform 0.18s ease;
}

.gsup-back:hover {
	color: var(--gsup-blue-text);
	transform: translateX(-3px);
}

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

.gsup-notice {
	padding: 15px 20px;
	border-radius: var(--gsup-radius-sm);
	font-size: 15px;
	margin-bottom: 24px;
	border-left: 4px solid var(--gsup-blue);
	background: var(--gsup-surface-muted);
}

.gsup-notice--success {
	border-left-color: var(--gsup-success);
	background: rgba(76, 147, 97, 0.09);
}

.gsup-notice--error {
	border-left-color: var(--gsup-pink);
	background: rgba(229, 0, 74, 0.07);
}

.gsup-notice--warn {
	border-left-color: #d98324;
	background: rgba(217, 131, 36, 0.09);
}

/* ---------- Status pills ---------- */

.gsup-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 15px;
	border-radius: 100px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	/* --pill-text is the AA-safe label colour; --pill stays vivid for the dot
	   and the background tint. Falls back to --pill if only one is set. */
	color: var(--pill-text, var(--pill, var(--gsup-blue-text)));
	background: color-mix(in srgb, var(--pill, #007EFE) 12%, var(--gsup-surface));
}

.gsup-status-pill::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--pill, var(--gsup-blue));
	flex: none;
}

.gsup-ref {
	font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--gsup-ink-soft);
	background: var(--gsup-surface-muted);
	padding: 4px 10px;
	border-radius: 6px;
}

/* ---------- Team cards ---------- */

.gsup-team {
	margin-bottom: 40px;
}

.gsup-team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 14px;
}

.gsup-team-grid--stack {
	grid-template-columns: 1fr;
}

.gsup-team-card {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 14px 16px;
	background: var(--gsup-surface);
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius-sm);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.gsup-team-card:hover {
	border-color: color-mix(in srgb, var(--gsup-blue) 40%, transparent);
	transform: translateY(-2px);
}

.gsup-team-card strong {
	display: block;
	font-size: 15px;
	line-height: 1.3;
}

.gsup-team-role {
	display: block;
	font-size: 13px;
	color: var(--gsup-ink-soft);
	margin-top: 2px;
}

.gsup-team-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

.gsup-team-avatar--blank {
	display: grid;
	place-items: center;
	background: var(--gsup-gradient);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	text-transform: uppercase;
}

/* ---------- Filters ---------- */

.gsup-filters {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 26px;
}

.gsup-tabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.gsup-tab {
	padding: 9px 18px;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
	color: var(--gsup-ink-soft);
	text-decoration: none;
	border: 1px solid transparent;
	transition: all 0.18s ease;
}

.gsup-tab:hover {
	color: var(--gsup-ink);
	background: var(--gsup-surface-muted);
}

.gsup-tab.is-active {
	color: var(--gsup-tab-colour, var(--gsup-ink));
	border-color: color-mix(in srgb, var(--gsup-tab-colour, #007EFE) 35%, transparent);
	background: color-mix(in srgb, var(--gsup-tab-colour, #007EFE) 8%, var(--gsup-surface));
}

.gsup-search {
	display: flex;
	gap: 8px;
}

.gsup-search input[type='search'] {
	padding: 11px 18px;
	border: 1px solid var(--gsup-border);
	border-radius: 100px;
	font-family: inherit;
	font-size: 14px;
	min-width: 220px;
	background: var(--gsup-surface);
	color: var(--gsup-ink);
}

.gsup-search input[type='search']:focus {
	outline: none;
	border-color: var(--gsup-blue);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gsup-blue) 16%, transparent);
}

/* ---------- Ticket list ---------- */

.gsup-ticket-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.gsup-ticket-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 22px 26px;
	background: var(--gsup-surface);
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius);
	text-decoration: none;
	color: inherit;
	position: relative;
	overflow: hidden;
	transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.4, 1.1), box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Gradient edge revealed on hover */
.gsup-ticket-link::before {
	content: '';
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--gsup-gradient);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1.1);
}

.gsup-ticket-link:hover {
	transform: translateY(-2px);
	box-shadow: var(--gsup-shadow-sm);
	border-color: transparent;
}

.gsup-ticket-link:hover::before {
	transform: scaleY(1);
}

.gsup-ticket-meta-top {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.gsup-ticket-subject {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 6px;
	line-height: 1.3;
}

.gsup-ticket-excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--gsup-ink-soft);
	max-width: 62ch;
}

.gsup-ticket-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	font-size: 13px;
	color: var(--gsup-ink-soft);
	text-align: right;
	flex: none;
}

.gsup-ticket-client {
	font-weight: 700;
	color: var(--gsup-ink);
}

/* ---------- Empty state ---------- */

.gsup-empty-state {
	text-align: center;
	padding: 70px 24px;
	border: 1px dashed var(--gsup-border);
	border-radius: var(--gsup-radius);
	background: var(--gsup-surface-muted);
}

.gsup-empty-state h3 {
	font-size: 21px;
	margin: 0 0 8px;
}

.gsup-empty-state p {
	color: var(--gsup-ink-soft);
	margin: 0 0 24px;
}

/* ---------- Pagination ---------- */

.gsup-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 32px;
}

.gsup-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
	color: var(--gsup-ink-soft);
	text-decoration: none;
	transition: all 0.18s ease;
}

.gsup-pagination .page-numbers:hover {
	background: var(--gsup-surface-muted);
	color: var(--gsup-ink);
}

.gsup-pagination .page-numbers.current {
	background: var(--gsup-gradient);
	color: #fff;
}

/* ---------- Forms ---------- */

/*
 * The form fills its container rather than sitting in a narrow column. Short
 * fields pair up on a row; the description and dropzone span the full width,
 * so nothing looks stranded.
 */
.gsup-form {
	background: var(--gsup-surface);
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius);
	padding: 36px 40px 32px;
	box-shadow: var(--gsup-shadow-sm);
	width: 100%;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 28px;
	align-items: start;
}

/*
 * Marked explicitly in the template rather than by position: the website
 * field is conditional, so nth-child rules would shift when a client has no
 * sites registered.
 */
.gsup-form > .gsup-field--wide,
.gsup-form > .gsup-form-actions {
	grid-column: 1 / -1;
}

.gsup-form-actions {
	padding-top: 6px;
	border-top: 1px solid var(--gsup-border);
	margin-top: 6px;
}

.gsup-field {
	margin-bottom: 22px;
}

.gsup-field label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 8px;
}

.gsup-req {
	color: var(--gsup-pink);
}

.gsup-field input[type='text'],
.gsup-field input[type='email'],
.gsup-field input[type='url'],
.gsup-field select,
.gsup-field textarea,
.gsup-composer textarea {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius-sm);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--gsup-ink);
	background: var(--gsup-surface);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.gsup-field textarea,
.gsup-composer textarea {
	resize: vertical;
	min-height: 90px;
}

.gsup-field input:focus,
.gsup-field select:focus,
.gsup-field textarea:focus,
.gsup-composer textarea:focus {
	outline: none;
	border-color: var(--gsup-blue);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gsup-blue) 16%, transparent);
}

/* Placeholders inherit the field colour at full strength in some browsers,
   which reads as filled-in text. Mute them explicitly. */
.gsup-portal ::placeholder {
	color: var(--gsup-ink-soft);
	opacity: 0.75;
}

.gsup-field label,
.gsup-composer label {
	color: var(--gsup-ink);
}

.gsup-form-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 8px;
}

/* ---------- Dropzone ---------- */

.gsup-dropzone {
	position: relative;
	border: 2px dashed var(--gsup-border);
	border-radius: var(--gsup-radius-sm);
	padding: 34px 20px;
	text-align: center;
	background: var(--gsup-surface-muted);
	transition: border-color 0.2s ease, background 0.2s ease;
	cursor: pointer;
}

.gsup-dropzone:hover,
.gsup-dropzone.is-dragging {
	border-color: var(--gsup-blue);
	background: color-mix(in srgb, var(--gsup-blue) 5%, var(--gsup-surface));
}

.gsup-file-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.gsup-dropzone-inner strong {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
}

.gsup-dropzone-inner span {
	font-size: 13px;
	color: var(--gsup-ink-soft);
}

.gsup-previews,
.gsup-composer-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.gsup-preview {
	position: relative;
	width: 84px;
	height: 84px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--gsup-border);
	animation: gsup-pop 0.25s cubic-bezier(0.2, 0.8, 0.4, 1.3);
}

.gsup-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gsup-preview-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border: none;
	border-radius: 50%;
	background: rgba(11, 11, 15, 0.72);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
}

@keyframes gsup-pop {
	from { opacity: 0; transform: scale(0.85); }
	to   { opacity: 1; transform: scale(1); }
}

/* ---------- Ticket detail ---------- */

.gsup-ticket-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--gsup-border);
	margin-bottom: 28px;
}

.gsup-ticket-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.gsup-status-select {
	padding: 11px 16px;
	border: 1px solid var(--gsup-border);
	border-radius: 100px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	background: var(--gsup-surface);
	color: var(--gsup-ink);
	cursor: pointer;
}

.gsup-ticket-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 310px;
	gap: 26px;
	align-items: start;
}

/* ---------- Chat ---------- */

.gsup-chat {
	background: var(--gsup-surface);
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius);
	overflow: hidden;
	box-shadow: var(--gsup-shadow-sm);
	display: flex;
	flex-direction: column;
	min-height: 420px;
}

.gsup-chat-scroll {
	padding: 26px;
	max-height: 620px;
	overflow-y: auto;
	scroll-behavior: smooth;
	display: flex;
	flex-direction: column;
	gap: 16px;
	scrollbar-width: thin;
}

.gsup-chat-scroll::-webkit-scrollbar {
	width: 8px;
}

.gsup-chat-scroll::-webkit-scrollbar-thumb {
	background: var(--gsup-border);
	border-radius: 4px;
}

#gsup-messages {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.gsup-bubble {
	max-width: 78%;
	padding: 16px 20px;
	border-radius: var(--gsup-radius);
	background: var(--gsup-surface-muted);
	border: 1px solid var(--gsup-border);
	animation: gsup-in 0.3s cubic-bezier(0.2, 0.8, 0.4, 1.1);
}

/* Client messages sit left, team messages right, mirroring a chat app. */
.gsup-bubble--client {
	align-self: flex-start;
	border-bottom-left-radius: 5px;
}

.gsup-bubble--agent {
	align-self: flex-end;
	border-bottom-right-radius: 5px;
	background: color-mix(in srgb, var(--gsup-blue) 7%, var(--gsup-surface));
	border-color: color-mix(in srgb, var(--gsup-blue) 20%, transparent);
}

.gsup-bubble--first {
	max-width: 100%;
	align-self: stretch;
	background: var(--gsup-surface);
	border-left: 3px solid var(--gsup-blue);
}

@keyframes gsup-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.gsup-bubble-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 8px;
	font-size: 13px;
}

.gsup-bubble-head strong {
	font-size: 14px;
}

.gsup-bubble-role {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 100px;
	background: var(--gsup-border);
	color: var(--gsup-ink-soft);
}

.gsup-bubble--agent .gsup-bubble-role {
	background: var(--gsup-blue);
	color: #fff;
}

.gsup-bubble-head time {
	margin-left: auto;
	color: var(--gsup-ink-soft);
	font-size: 12px;
}

.gsup-bubble-body {
	font-size: 15px;
	line-height: 1.65;
}

.gsup-bubble-body p {
	margin: 0 0 10px;
}

.gsup-bubble-body p:last-child {
	margin-bottom: 0;
}

.gsup-bubble-files {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.gsup-bubble-files img {
	width: 108px;
	height: 108px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--gsup-border);
	display: block;
	transition: transform 0.2s ease;
}

.gsup-bubble-files a:hover img {
	transform: scale(1.04);
}

/* System entries */
.gsup-system {
	align-self: center;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--gsup-ink-soft);
	background: var(--gsup-surface-muted);
	border-radius: 100px;
	padding: 7px 16px;
}

.gsup-system time {
	opacity: 0.7;
}

/* ---------- Composer ---------- */

.gsup-composer {
	border-top: 1px solid var(--gsup-border);
	padding: 18px 22px 22px;
	background: var(--gsup-surface);
}

.gsup-composer--locked {
	text-align: center;
	color: var(--gsup-ink-soft);
	font-size: 14px;
}

.gsup-composer--locked p {
	margin: 0;
}

.gsup-composer-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.gsup-attach {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--gsup-ink-soft);
	cursor: pointer;
	padding: 9px 16px;
	border-radius: 100px;
	border: 1px solid var(--gsup-border);
	transition: all 0.18s ease;
}

.gsup-attach:hover {
	color: var(--gsup-blue-text);
	border-color: var(--gsup-blue);
}

.gsup-attach input[type='file'] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
}

.gsup-composer-error {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--gsup-pink);
	min-height: 1em;
}

/* ---------- Sidebar ---------- */

.gsup-card {
	background: var(--gsup-surface);
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius);
	padding: 22px;
	margin-bottom: 16px;
}

.gsup-card-title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gsup-ink-soft);
	margin: 0 0 16px;
}

.gsup-detail-list {
	margin: 0;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px 16px;
	font-size: 14px;
}

.gsup-detail-list dt {
	color: var(--gsup-ink-soft);
	font-size: 13px;
}

.gsup-detail-list dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
	overflow-wrap: anywhere;
}

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

.gsup-portal--login {
	display: grid;
	place-items: center;
	min-height: 52vh;
}

.gsup-login-card {
	width: 100%;
	max-width: 420px;
	background: var(--gsup-surface);
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius);
	padding: 40px;
	box-shadow: var(--gsup-shadow);
	text-align: left;
}

.gsup-login-card h2 {
	font-size: 26px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin: 0 0 10px;
	color: var(--gsup-ink);
}

.gsup-login-card > p {
	color: var(--gsup-ink-soft);
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 24px;
}

.gsup-login-card .login-username,
.gsup-login-card .login-password {
	margin-bottom: 16px;
}

.gsup-login-card label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 7px;
	color: var(--gsup-ink);
}

/* wp_login_form() renders "Remember Me" as an inline label wrapping a
   checkbox, which the block rule above would turn into a stacked heading. */
.gsup-login-card .login-remember {
	margin-bottom: 20px;
}

.gsup-login-card .login-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 0;
	color: var(--gsup-ink-soft);
	cursor: pointer;
}

.gsup-login-card .login-remember input[type='checkbox'] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--gsup-blue);
	cursor: pointer;
}

.gsup-login-card input[type='text'],
.gsup-login-card input[type='password'] {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius-sm);
	font-family: inherit;
	font-size: 15px;
	background: var(--gsup-surface);
	color: var(--gsup-ink);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.gsup-login-card input[type='text']:focus,
.gsup-login-card input[type='password']:focus {
	outline: none;
	border-color: var(--gsup-blue);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gsup-blue) 16%, transparent);
}

.gsup-login-card input[type='submit'] {
	width: 100%;
	padding: 14px 28px;
	border: none;
	border-radius: 100px;
	background: var(--gsup-gradient);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gsup-login-card input[type='submit']:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(111, 0, 189, 0.32);
}

.gsup-login-help {
	margin: 18px 0 0;
	font-size: 14px;
}

.gsup-login-help a {
	color: var(--gsup-blue-text);
	text-decoration: none;
}

/* ---------- Utility ---------- */

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

.gsup-is-sending {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.gsup-ticket-layout {
		grid-template-columns: 1fr;
	}

	.gsup-sidebar {
		order: -1;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: 16px;
	}

	.gsup-sidebar .gsup-card {
		margin-bottom: 0;
	}
}

@media (max-width: 720px) {
	.gsup-portal {
		padding: 8px 16px 60px;
	}

	.gsup-hero {
		align-items: flex-start;
	}

	.gsup-ticket-link {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.gsup-ticket-side {
		align-items: flex-start;
		text-align: left;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px;
	}

	.gsup-bubble {
		max-width: 92%;
	}

	.gsup-filters {
		align-items: stretch;
	}

	.gsup-search {
		width: 100%;
	}

	.gsup-search input[type='search'] {
		flex: 1;
		min-width: 0;
	}

	.gsup-form {
		grid-template-columns: 1fr;
		padding: 24px 20px;
	}

	.gsup-chat-scroll {
		padding: 18px;
		max-height: 70vh;
	}
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
	.gsup-portal *,
	.gsup-portal *::before,
	.gsup-portal *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Portal login form ---------- */

.gsup-login-form .gsup-field {
	margin-bottom: 16px;
}

.gsup-login-form input[type='text'],
.gsup-login-form input[type='password'] {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius-sm);
	font-family: inherit;
	font-size: 15px;
	background: var(--gsup-surface);
	color: var(--gsup-ink);
}

.gsup-login-form input[type='text']:focus,
.gsup-login-form input[type='password']:focus {
	outline: none;
	border-color: var(--gsup-blue);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gsup-blue) 16%, transparent);
}

.gsup-login-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--gsup-ink-soft);
	margin-bottom: 20px;
	cursor: pointer;
}

.gsup-login-remember input[type='checkbox'] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--gsup-blue);
}

.gsup-login-submit {
	width: 100%;
}

.gsup-login-note {
	margin: 14px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--gsup-ink-soft);
	padding-top: 14px;
	border-top: 1px solid var(--gsup-border);
}

/* ---------- Pale status tint on the ticket heading ---------- */

.gsup-ticket-header {
	padding: 18px 22px;
	border-radius: var(--gsup-radius);
	border: 1px solid var(--gsup-border);
	border-bottom: 1px solid var(--gsup-border);
	background: color-mix(in srgb, var(--head, #007EFE) 9%, var(--gsup-surface));
}

/* Ticket list rows carry the same tint, so status is readable at a glance. */
.gsup-ticket-link {
	background: color-mix(in srgb, var(--row, transparent) 6%, var(--gsup-surface));
}

/* =========================================================================
   Refinement layer
   -------------------------------------------------------------------------
   Corrects the "generated" feel of the base styles: everything was a pill,
   the brand gradient appeared on every surface, and shadows were uniformly
   soft. Real interfaces reserve their loudest asset for one job and use
   flatter, tighter geometry elsewhere.
   ========================================================================= */

.gsup-portal {
	/* Squared-off, editorial geometry rather than uniformly rounded cards. */
	--gsup-radius: 10px;
	--gsup-radius-sm: 7px;

	/* Tight, close shadows read as printed material; wide soft blurs read
	   as a template. */
	--gsup-shadow: 0 1px 2px rgba(11, 11, 15, 0.05), 0 8px 24px -12px rgba(11, 11, 15, 0.14);
	--gsup-shadow-sm: 0 1px 2px rgba(11, 11, 15, 0.05);

	background: var(--gsup-page, #F6F7FB);
	border-radius: 0;
}

/* --- Typography: tighter, more deliberate -------------------------------- */

.gsup-title {
	font-size: clamp(28px, 3.6vw, 42px);
	letter-spacing: -0.035em;
	line-height: 1.04;
}

.gsup-eyebrow {
	font-size: 11px;
	letter-spacing: 0.18em;
	color: var(--gsup-ink-soft);
	margin-bottom: 10px;
}

.gsup-lede {
	font-size: 16px;
	max-width: 60ch;
}

/* --- Buttons: one gradient on the page, everything else quiet ------------ */

.gsup-btn {
	border-radius: 6px;
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.01em;
	border-width: 1px;
	transition: background-color 0.15s cubic-bezier(0.32, 0.72, 0, 1),
		border-color 0.15s cubic-bezier(0.32, 0.72, 0, 1),
		transform 0.15s cubic-bezier(0.32, 0.72, 0, 1);
}

/*
 * Solid ink, not the gradient. The gradient stays reserved for the brand
 * moment in the hero rule and the status accents, which is what makes it
 * feel intentional rather than decorative.
 */
.gsup-btn--primary {
	background: var(--gsup-ink);
	background-image: none;
	color: #fff;
	box-shadow: none;
}

.gsup-btn--primary:hover {
	background: #2A2A38;
	background-image: none;
	transform: none;
	box-shadow: none;
}

.gsup-btn--primary:active {
	transform: scale(0.985);
}

.gsup-btn--ghost {
	background: var(--gsup-surface);
	border-color: var(--gsup-border);
	color: var(--gsup-ink);
}

.gsup-btn--ghost:hover {
	background: var(--gsup-surface-muted);
	border-color: #C9CDDD;
	color: var(--gsup-ink);
	transform: none;
}

/* --- Hero: a single hairline of brand colour ---------------------------- */

.gsup-hero {
	position: relative;
	padding-top: 26px;
	border-bottom: 1px solid var(--gsup-border);
}

.gsup-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 56px;
	height: 3px;
	background: var(--gsup-gradient);
	border-radius: 2px;
}

/* --- Cards & surfaces ---------------------------------------------------- */

.gsup-form,
.gsup-card,
.gsup-chat,
.gsup-login-card,
.gsup-team-card {
	border-radius: var(--gsup-radius);
	box-shadow: var(--gsup-shadow-sm);
}

.gsup-team-card:hover {
	transform: none;
	border-color: #C9CDDD;
	background: var(--gsup-surface-muted);
}

/* --- Ticket rows: flat list, not floating cards -------------------------- */

.gsup-ticket-list {
	gap: 0;
	border: 1px solid var(--gsup-border);
	border-radius: var(--gsup-radius);
	overflow: hidden;
	background: var(--gsup-surface);
}

.gsup-ticket-link {
	border: none;
	border-top: 1px solid var(--gsup-border);
	border-radius: 0;
	padding: 18px 22px;
	background: var(--gsup-surface);
	transition: background-color 0.14s cubic-bezier(0.32, 0.72, 0, 1);
}

.gsup-ticket-item:first-child .gsup-ticket-link {
	border-top: none;
}

.gsup-ticket-link:hover {
	transform: none;
	box-shadow: none;
	background: var(--gsup-surface-muted);
}

/* The status colour reads as a spine on the row rather than a wash. */
.gsup-ticket-link::before {
	width: 3px;
	background: var(--row, transparent);
	transform: none;
	opacity: 1;
}

.gsup-ticket-subject {
	font-size: 16px;
	letter-spacing: -0.015em;
}

/* --- Status pills: label-like, not candy -------------------------------- */

.gsup-status-pill {
	border-radius: 4px;
	padding: 3px 9px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: transparent;
	border: 1px solid color-mix(in srgb, var(--pill, #007EFE) 32%, transparent);
}

.gsup-status-pill::before {
	width: 5px;
	height: 5px;
}

.gsup-ref {
	border-radius: 4px;
	background: transparent;
	border: 1px solid var(--gsup-border);
	padding: 3px 8px;
}

/* --- Filter tabs: underline, not pills ---------------------------------- */

.gsup-tabs {
	gap: 2px;
	border-bottom: 1px solid var(--gsup-border);
	width: 100%;
}

.gsup-tab {
	border-radius: 0;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: -1px;
}

.gsup-tab:hover {
	background: transparent;
	color: var(--gsup-ink);
}

.gsup-tab.is-active {
	background: transparent;
	border-bottom-color: var(--gsup-tab-colour, var(--gsup-ink));
	color: var(--gsup-ink);
}

/* --- Inputs: crisper ----------------------------------------------------- */

.gsup-field input[type='text'],
.gsup-field input[type='email'],
.gsup-field input[type='url'],
.gsup-field select,
.gsup-field textarea,
.gsup-composer textarea,
.gsup-login-form input,
.gsup-search input[type='search'] {
	border-radius: 6px;
	font-size: 14px;
	padding: 10px 13px;
}

.gsup-search input[type='search'] {
	border-radius: 6px;
}

.gsup-field label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: -0.005em;
	margin-bottom: 6px;
}

/* --- Chat bubbles: squarer, quieter ------------------------------------- */

.gsup-bubble {
	border-radius: 8px;
	box-shadow: none;
}

.gsup-bubble--client {
	border-bottom-left-radius: 2px;
}

.gsup-bubble--agent {
	border-bottom-right-radius: 2px;
}

.gsup-bubble--first {
	border-radius: 8px;
	border-left-width: 2px;
}

/* --- System entries: quiet, with a legible timestamp -------------------- */

.gsup-system,
.gsup-sys {
	border-radius: 4px;
	background: transparent;
	border: 1px solid var(--gsup-border);
	font-size: 12px;
	padding: 5px 12px;
	gap: 8px;
}

.gsup-system time,
.gsup-sys time {
	opacity: 1;
	color: var(--gsup-ink-soft);
	font-size: 11px;
	white-space: nowrap;
}

.gsup-sys time::before {
	content: '·';
	margin-right: 7px;
	opacity: 0.5;
}

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

.gsup-login-card {
	border-radius: var(--gsup-radius);
	padding: 34px 32px;
	box-shadow: var(--gsup-shadow);
}

.gsup-login-card input[type='submit'],
.gsup-login-submit {
	border-radius: 6px;
	background: var(--gsup-ink);
	background-image: none;
	box-shadow: none;
}

.gsup-login-card input[type='submit']:hover,
.gsup-login-submit:hover {
	background: #2A2A38;
	background-image: none;
	transform: none;
	box-shadow: none;
}

/* --- Pagination ---------------------------------------------------------- */

.gsup-pagination .page-numbers {
	border-radius: 6px;
	min-width: 34px;
	height: 34px;
	font-size: 13px;
}

.gsup-pagination .page-numbers.current {
	background: var(--gsup-ink);
	background-image: none;
}

/* --- Avatars: soften the rainbow ---------------------------------------- */

.gsup-team-avatar--blank {
	background: var(--gsup-ink);
	font-size: 15px;
}

/* --- Empty state --------------------------------------------------------- */

.gsup-empty-state {
	border-radius: var(--gsup-radius);
	border-color: var(--gsup-border);
	padding: 56px 24px;
}

@media (max-width: 720px) {
	.gsup-tabs {
		overflow-x: auto;
		flex-wrap: nowrap;
		scrollbar-width: none;
	}

	.gsup-tabs::-webkit-scrollbar {
		display: none;
	}
}
