/**
 * TCN Gateway — front-end styling.
 * Tuned to the TCN-28 deck: near-black surfaces, warm orange accent.
 */

:root {
	--tcng-orange: #ee7127;
	--tcng-orange-soft: rgba(238, 113, 39, 0.14);
	--tcng-ink: #ffffff;
	--tcng-dim: #a9a9b2;
	--tcng-line: rgba(255, 255, 255, 0.14);
	--tcng-panel: #141416;
	--tcng-panel-2: #1b1b1f;
}

/* ---------- Reading progress ---------- */

.tcng-progress {
	position: fixed;
	inset: 0 0 auto 0;
	height: 3px;
	background: rgba(255, 255, 255, 0.08);
	z-index: 9999;
	pointer-events: none;
}

.tcng-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #f0913f, var(--tcng-orange));
	transition: width 0.12s linear;
}

/* ---------- Alerts ---------- */

.tcng-alert {
	border-radius: 10px;
	padding: 16px 20px;
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.6;
	border: 1px solid var(--tcng-line);
	background: var(--tcng-panel-2);
	color: var(--tcng-ink);
}

.tcng-alert strong {
	color: #fff;
}

.tcng-alert--info {
	border-color: rgba(238, 113, 39, 0.4);
	background: var(--tcng-orange-soft);
}

.tcng-alert--error {
	border-color: rgba(239, 68, 68, 0.45);
	background: rgba(239, 68, 68, 0.12);
}

.tcng-alert--ok {
	border-color: rgba(16, 185, 129, 0.45);
	background: rgba(16, 185, 129, 0.12);
}

.tcng-alert ul {
	margin: 8px 0 0 18px;
	padding: 0;
}

.tcng-alert a {
	color: var(--tcng-orange);
}

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

.tcng-gate {
	max-width: 860px;
	margin: 0 auto;
	color: var(--tcng-ink);
}

.tcng-form__section {
	background: var(--tcng-panel);
	border: 1px solid var(--tcng-line);
	border-radius: 14px;
	padding: 30px 32px;
	margin-bottom: 22px;
}

.tcng-form__legend {
	margin: 0 0 6px;
	font-size: 19px;
	color: #fff;
	letter-spacing: 0.01em;
}

.tcng-form__hint {
	margin: 0 0 18px;
	font-size: 14px;
	color: var(--tcng-dim);
}

.tcng-form__hint--muted {
	margin: 10px 0 0;
	font-size: 13px;
}

.tcng-form__fineprint {
	font-size: 12.5px;
	color: #74747d;
	margin-top: 14px;
}

.tcng-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 20px;
}

.tcng-field--wide {
	grid-column: 1 / -1;
}

.tcng-field {
	display: block;
}

.tcng-field > span {
	display: block;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tcng-dim);
	margin-bottom: 7px;
}

.tcng-field > span em {
	color: var(--tcng-orange);
	font-style: normal;
}

.tcng-field input,
.tcng-field textarea,
.tcng-field select {
	width: 100%;
	background: #0d0d0f;
	border: 1px solid var(--tcng-line);
	border-radius: 8px;
	color: #fff;
	font-size: 15px;
	padding: 12px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-shadow: none;
}

.tcng-field input:focus,
.tcng-field textarea:focus {
	outline: none;
	border-color: var(--tcng-orange);
	box-shadow: 0 0 0 3px rgba(238, 113, 39, 0.18);
}

/* ---------- NDA box ---------- */

.tcng-nda {
	max-height: 340px;
	overflow-y: auto;
	background: #0d0d0f;
	border: 1px solid var(--tcng-line);
	border-radius: 10px;
	padding: 24px 26px;
	font-size: 14px;
	line-height: 1.75;
	color: #c8c8d0;
	scrollbar-width: thin;
}

.tcng-nda p {
	margin: 0 0 14px;
}

.tcng-nda::-webkit-scrollbar {
	width: 10px;
}

.tcng-nda::-webkit-scrollbar-thumb {
	background: #34343a;
	border-radius: 6px;
}

.tcng-nda--static {
	max-height: none;
}

.tcng-nda.is-complete {
	border-color: rgba(16, 185, 129, 0.5);
}

/* ---------- Signature ---------- */

.tcng-sign {
	margin-top: 22px;
	border: 1px solid var(--tcng-line);
	border-radius: 10px;
	padding: 18px 20px;
	background: #0d0d0f;
}

.tcng-sign__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	gap: 12px;
	flex-wrap: wrap;
}

.tcng-sign__head > span {
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tcng-dim);
}

.tcng-sign__head em {
	color: var(--tcng-orange);
	font-style: normal;
}

.tcng-sign__tabs {
	display: inline-flex;
	background: #17171b;
	border: 1px solid var(--tcng-line);
	border-radius: 8px;
	overflow: hidden;
}

/*
 * Flatsome gives every <button> a min-height of 2.5em, a 2.4em line-height
 * and a bottom margin. Those have to be unset explicitly or the controls
 * below balloon — overriding padding alone is not enough.
 */
.tcng-sign__tabs button {
	background: transparent;
	border: 0;
	color: var(--tcng-dim);
	font-size: 13px;
	font-weight: 600;
	padding: 7px 20px;
	cursor: pointer;
	line-height: 1.5;
	min-height: 0;
	height: auto;
	margin: 0;
	border-radius: 0;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	text-shadow: none;
}

.tcng-sign__tabs button.is-active {
	background: var(--tcng-orange);
	color: #fff;
}

.tcng-sign__panel {
	display: none;
}

.tcng-sign__panel.is-active {
	display: block;
}

.tcng-sign__typed {
	width: 100%;
	background: #fff;
	border: 1px solid var(--tcng-line);
	border-radius: 8px;
	padding: 14px 18px;
	font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive;
	font-size: 30px;
	line-height: 1.4;
	color: #111;
}

.tcng-sign__canvas {
	width: 100%;
	height: 150px;
	background: #fff;
	border-radius: 8px;
	display: block;
	touch-action: none;
	cursor: crosshair;
}

.tcng-sign__clear {
	margin: 10px 0 0;
	background: transparent;
	border: 1px solid var(--tcng-line);
	color: var(--tcng-dim);
	border-radius: 6px;
	padding: 6px 14px;
	font-size: 13px;
	cursor: pointer;
	line-height: 1.5;
	min-height: 0;
	height: auto;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}

/* ---------- Consent ---------- */

.tcng-check {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-top: 22px;
	font-size: 14.5px;
	line-height: 1.6;
	color: #d3d3da;
}

.tcng-check input {
	margin-top: 3px;
	width: 19px;
	height: 19px;
	flex: 0 0 19px;
	accent-color: var(--tcng-orange);
}

.tcng-check input:disabled + span {
	opacity: 0.5;
}

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

.tcng-btn {
	display: inline-block;
	border: 0;
	border-radius: 8px;
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding: 12px 26px;
	line-height: 1.5;
	min-height: 0;
	height: auto;
	margin: 0;
	cursor: pointer;
	text-decoration: none;
	text-transform: none;
	box-shadow: none;
	text-shadow: none;
	transition: transform 0.12s ease, background 0.15s ease;
}

.tcng-btn--primary {
	background: var(--tcng-orange);
	color: #fff;
}

.tcng-btn--primary:hover {
	background: #d9601a;
	color: #fff;
	transform: translateY(-1px);
}

.tcng-btn--primary:disabled {
	background: #3a3a41;
	color: #7d7d86;
	cursor: not-allowed;
	transform: none;
}

.tcng-btn--ghost {
	background: transparent;
	border: 1px solid var(--tcng-line);
	color: #fff;
}

.tcng-btn--ghost:hover {
	border-color: var(--tcng-orange);
	color: #fff;
}

/* Rendered as a <button> so it can reveal the reset form without a page load. */
.tcng-link {
	display: inline-block;
	background: none;
	border: 0;
	padding: 0;
	margin: 0 0 0 18px;
	min-height: 0;
	height: auto;
	line-height: 1.5;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--tcng-dim);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}

.tcng-link:hover {
	color: var(--tcng-orange);
	background: none;
}

/* ---------- Agreement helper note ---------- */

.tcng-ndanote {
	margin: 12px 0 0;
	font-size: 13.5px;
	line-height: 1.6;
}

.tcng-ndanote a {
	color: var(--tcng-orange);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tcng-ndanote span {
	display: block;
	margin-top: 4px;
	color: #7d7d86;
	font-size: 12.5px;
}

.tcng-lostpass {
	margin-top: 4px;
}

/* ---------- Returning user card ---------- */

.tcng-altcard {
	margin-top: 34px;
	padding: 28px 32px;
	border: 1px solid var(--tcng-line);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.02);
}

.tcng-altcard h3 {
	margin: 0 0 18px;
	font-size: 17px;
	color: #fff;
}

.tcng-form--compact .tcng-grid {
	margin-bottom: 18px;
}

/* ---------- Download cards ---------- */

.tcng-files {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
	margin: 24px 0;
}

.tcng-file {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	border: 1px solid var(--tcng-line);
	border-radius: 12px;
	background: var(--tcng-panel);
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.tcng-file:hover {
	border-color: var(--tcng-orange);
	background: var(--tcng-panel-2);
}

.tcng-file__icon {
	flex: 0 0 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: var(--tcng-orange-soft);
	color: var(--tcng-orange);
}

.tcng-file__text {
	flex: 1 1 auto;
	min-width: 0;
}

.tcng-file__text strong {
	display: block;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.tcng-file__text small {
	display: block;
	margin-top: 3px;
	color: var(--tcng-dim);
	font-size: 12.5px;
	letter-spacing: 0.03em;
}

.tcng-file__go {
	color: var(--tcng-orange);
	font-size: 18px;
}

/* ---------- Account ---------- */

.tcng-account__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
	margin-bottom: 26px;
}

.tcng-card {
	border: 1px solid var(--tcng-line);
	border-radius: 12px;
	padding: 24px 26px;
	background: var(--tcng-panel);
}

.tcng-card h3 {
	margin: 0 0 16px;
	font-size: 16px;
	color: #fff;
}

.tcng-card dl {
	margin: 0;
	font-size: 14px;
}

/*
 * Flatsome leaves definition lists inline, which runs each label straight
 * into the value beside it. Force the pairs to stack.
 */
.tcng-card dt {
	display: block;
	color: #74747d;
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-top: 14px;
	line-height: 1.4;
}

.tcng-card dt:first-child {
	margin-top: 0;
}

.tcng-card dd {
	display: block;
	margin: 3px 0 0;
	color: #dcdce2;
	line-height: 1.5;
}

.tcng-account__docs {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tcng-account__docs li {
	padding: 10px 0;
	border-bottom: 1px solid var(--tcng-line);
}

.tcng-account__docs li:last-child {
	border-bottom: 0;
}

.tcng-account__docs a {
	color: var(--tcng-orange);
	font-weight: 600;
	text-decoration: none;
}

.tcng-account__docs small {
	display: block;
	color: #74747d;
	font-size: 12px;
	margin-top: 2px;
}

/* ---------- Pharmacy ---------- */

.tcng-pharmacy {
	border: 1px solid var(--tcng-line);
	border-radius: 12px;
	padding: 28px 30px;
	background: var(--tcng-panel-2);
}

.tcng-pharmacy + .tcng-pharmacy {
	margin-top: 16px;
}

.tcng-pharmacy__name {
	margin: 0 0 10px;
	font-size: 20px;
	color: #fff;
}

.tcng-pharmacy__addr,
.tcng-pharmacy__lines,
.tcng-pharmacy__states,
.tcng-pharmacy__note {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.65;
	color: #dcdce2;
}

.tcng-pharmacy__lines span {
	display: block;
}

.tcng-pharmacy__lines a {
	color: var(--tcng-orange);
	text-decoration: none;
}

.tcng-pharmacy__states {
	font-size: 13.5px;
	color: var(--tcng-dim);
}

.tcng-pharmacy__note {
	color: var(--tcng-orange);
}

.tcng-pharmacy__admin {
	margin: 14px 0 0;
	font-size: 12.5px;
	line-height: 1.6;
	color: #74747d;
}

/*
 * The locked state stands in for content the clinic has not earned access to
 * yet. It has to read as deliberate rather than broken, so it keeps the same
 * card shape as the real thing.
 */
.tcng-locked {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	border: 1px solid var(--tcng-line);
	border-radius: 12px;
	padding: 28px 30px;
	background: var(--tcng-panel-2);
}

.tcng-locked__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--tcng-orange-soft);
	color: var(--tcng-orange);
}

.tcng-locked__body strong {
	display: block;
	font-size: 17px;
	color: #fff;
	margin-bottom: 8px;
	line-height: 1.4;
}

.tcng-locked__body p {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.65;
	color: #b6b6bf;
}

.tcng-locked--soft .tcng-locked__body p {
	margin-bottom: 0;
}

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

@media (max-width: 680px) {
	.tcng-grid {
		grid-template-columns: 1fr;
	}

	.tcng-form__section {
		padding: 24px 20px;
	}

	.tcng-btn {
		width: 100%;
		text-align: center;
	}

	.tcng-link {
		display: block;
		margin: 14px 0 0;
	}

	.tcng-locked {
		flex-direction: column;
		gap: 14px;
		padding: 24px 20px;
	}

	.tcng-pharmacy {
		padding: 24px 20px;
	}
}

/* ---------- Disclaimers ---------- */

/*
 * A proximal disclaimer has to be readable but must not compete with the
 * claim it qualifies — hence the quiet orange rule rather than a box.
 */
.tcng-disclaimer {
	margin: 10px 0 18px;
	padding: 2px 0 2px 14px;
	border-left: 2px solid rgba(238, 113, 39, 0.55);
	font-size: 13px;
	line-height: 1.6;
	color: #9a9aa3;
}
