/*
 * Error and edge states (inc/states.php): 404, server error, offline, maintenance, empty basket.
 * Figma "10 · Edge cases" (desktop 2148:49717 …, mobile 2148:49860 …).
 * Every colour has a fallback because the server error and maintenance pages are standalone
 * files that load without the kit's variables. Selectors carry .tms so the kit's site-wide
 * h1, a and button styles do not win.
 */

.tms {
	display: flex;
	flex-direction: column;
	gap: 56px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 112px 80px 96px;
	box-sizing: border-box;
	color: var(--ink, #171719);
	font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tms *,
.tms *::before,
.tms *::after {
	box-sizing: border-box;
}
body .tms a {
	color: inherit;
	text-decoration: none;
}
.tms p,
.tms ul {
	margin: 0;
	padding: 0;
}
.tms ul {
	list-style: none;
}

.tms .tms-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
}
.tms .tms-mark {
	display: grid;
	place-items: center;
	width: 88px;
	height: 88px;
	border-radius: 100px;
	background: var(--surface, #FBFBFA);
	border: 1px solid var(--line, #E4E4E7);
	color: var(--tan, #6F6556);
}
.tms--error .tms-mark {
	background: #FBF0EF;
	border-color: #E8C9C6;
	color: var(--error, #AF2820);
}
.tms--cream .tms-mark {
	background: var(--cream, #F2EDE1);
	border-color: var(--cream-dark, #E1DACB);
}
.tms .tms-mark-icon {
	width: 36px;
	height: 36px;
}
.tms .tms-eyebrow {
	color: var(--tan, #6F6556);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}
.tms .tms-title {
	max-width: 720px;
	margin: 0;
	color: var(--ink, #171719);
	font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 40px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -1px;
}
.tms .tms-text {
	max-width: 600px;
	color: var(--body, #656569);
	font-size: 17px;
	line-height: 1.62;
}
.tms .tms-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	padding-top: 8px;
}
.tms .tms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 30px;
	border: 1px solid var(--ink, #171719);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	transition: background-color .2s, color .2s;
}
.tms .tms-btn.is-primary {
	background: var(--ink, #171719);
	color: var(--white, #FFFFFF);
}
.tms .tms-btn.is-secondary {
	background: var(--white, #FFFFFF);
}
.tms .tms-btn.is-secondary:hover {
	background: var(--ink, #171719);
	color: var(--white, #FFFFFF);
}
.tms .tms-btn-icon {
	width: 18px;
	height: 18px;
}

/* Or pick up from here */
.tms .tms-links {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-top: 40px;
	border-top: 1px solid var(--line, #E4E4E7);
}
.tms .tms-label {
	color: var(--muted, #96969A);
	font-size: 10px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}
.tms .tms-links ul {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1px;
	background: var(--hair, #E4E2DD);
}
.tms .tms-links a {
	display: flex;
	flex-direction: column;
	gap: 8px;
	height: 100%;
	padding: 24px 20px;
	background: var(--white, #FFFFFF);
}
.tms .tms-links a:hover {
	background: var(--surface, #FBFBFA);
}
.tms .tms-link-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
}
.tms .tms-link-icon {
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--muted, #96969A);
	transition: transform .2s;
}
.tms .tms-links a:hover .tms-link-icon {
	color: var(--ink, #171719);
	transform: translateX(4px);
}
.tms .tms-link-line {
	color: var(--body, #656569);
	font-size: 13px;
	line-height: 1.5;
}
.tms .tms-note {
	padding: 20px 24px;
	background: var(--warm, #F6F3EF);
	color: var(--body, #656569);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

/* The theme narrows .site-main to a reading column; these states use the full layout width. */
html body .site-main.tms-page,
html body.woocommerce-cart .site-main:has(.tms) {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}
body.woocommerce-cart .site-main:has(.tms) .page-content,
body.woocommerce-cart .site-main:has(.tms) .woocommerce {
	max-width: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 1024px) {
	.tms {
		padding: 88px 40px 80px;
	}
	.tms .tms-links a {
		padding: 20px 16px;
	}
}

@media (max-width: 767px) {
	.tms {
		gap: 36px;
		padding: 64px 20px 56px;
	}
	.tms .tms-block {
		gap: 20px;
	}
	.tms .tms-mark {
		width: 72px;
		height: 72px;
	}
	.tms .tms-mark-icon {
		width: 30px;
		height: 30px;
	}
	.tms .tms-eyebrow {
		font-size: 10px;
	}
	.tms .tms-title {
		font-size: 28px;
		line-height: 1.25;
		letter-spacing: -.5px;
	}
	.tms .tms-text {
		font-size: 15px;
		line-height: 1.6;
	}
	.tms .tms-actions {
		flex-direction: column;
		align-self: stretch;
		gap: 10px;
		padding-top: 6px;
	}
	.tms .tms-btn {
		padding: 15px 24px;
	}
	.tms .tms-links {
		gap: 16px;
		padding-top: 32px;
	}
	.tms .tms-links ul {
		display: block;
		background: none;
	}
	.tms .tms-links li + li {
		border-top: 1px solid var(--line, #E4E4E7);
	}
	.tms .tms-links a {
		gap: 2px;
		padding: 14px 0;
		background: none;
	}
	.tms .tms-link-line {
		font-size: 12px;
	}
	.tms .tms-note {
		padding: 16px 20px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tms .tms-btn,
	.tms .tms-link-icon {
		transition: none;
	}
}
