/* =========================================================
   threadslabin - DOCUMENT / POLICY PAGES
   Save as: assets/css/doc.css

   Shared by every long-form information page:
     Delivery Information, Return & Refund Policy,
     Terms & Conditions, Privacy Policy, B2B / Bulk Orders

   Scoped to .tl-doc, the wrapper inside the HTML block, so
   one stylesheet covers all of them. Adding another such
   page needs no new CSS: wrap its content in .tl-doc and add
   its slug to the two places noted below.
   ========================================================= */

.tl-doc {
	--dc-accent: var(--madder, #a8402f);
	--dc-accent-dark: #8c3526;
	--dc-accent-soft: #faf1ef;

	--dc-ink: var(--ink, #1a1d1a);
	--dc-text: var(--ink-soft, #5d625c);
	--dc-muted: #8a8f89;

	--dc-border: rgba(26, 29, 26, 0.13);
	--dc-border-soft: rgba(26, 29, 26, 0.08);

	--dc-shadow: 0 14px 36px rgba(26, 29, 26, 0.07);

	--dc-radius: 14px;
	--dc-radius-sm: 9px;

	color: var(--dc-text);
	font-size: 1rem;
	line-height: 1.72;
}

/* =========================================================
   1. PAGE FRAME

   page.php wraps pages in .wrap-narrow (680px). Good for
   plain text, too tight once there are tables and cards, so
   these pages widen a little.

   ADD A NEW DOC PAGE: append its body class here, and add
   its slug to the 'doc' entry in inc/body-classes.php.
   ========================================================= */

body.custom-page-delivery-information .site-main > .wrap-narrow,
body.custom-page-return-refund-policy .site-main > .wrap-narrow,
body.custom-page-terms-conditions .site-main > .wrap-narrow,
body.custom-page-privacy-policy .site-main > .wrap-narrow,
body.custom-page-b2b-bulk-orders .site-main > .wrap-narrow {
	width: min(100% - 2.5rem, 880px);
}

/*
 * Space before the footer.
 *
 * It was coming from two places at once: .site-main carries
 * padding: clamp(2rem, 6vw, 4.5rem) 0, and style.css puts
 * margin-top: clamp(2.5rem, 6vw, 4rem) on .site-footer. Stacked, that
 * is up to 8.5rem of empty page. Zeroing the footer margin and setting
 * one modest value on .site-main leaves a single, predictable gap that
 * scales the same way on every screen.
 */
body.custom-page-delivery-information .site-main,
body.custom-page-return-refund-policy .site-main,
body.custom-page-terms-conditions .site-main,
body.custom-page-privacy-policy .site-main,
body.custom-page-b2b-bulk-orders .site-main {
	padding-top: clamp(2rem, 4vw, 3rem);
	padding-bottom: clamp(2rem, 4vw, 3rem);
}

body.custom-page-delivery-information .site-footer,
body.custom-page-return-refund-policy .site-footer,
body.custom-page-terms-conditions .site-footer,
body.custom-page-privacy-policy .site-footer,
body.custom-page-b2b-bulk-orders .site-footer {
	margin-top: 0;
}

body.custom-page-delivery-information .page-header,
body.custom-page-return-refund-policy .page-header,
body.custom-page-terms-conditions .page-header,
body.custom-page-privacy-policy .page-header,
body.custom-page-b2b-bulk-orders .page-header {
	margin-bottom: 0.9rem;
	text-align: center;
}

body.custom-page-delivery-information .page-title,
body.custom-page-return-refund-policy .page-title,
body.custom-page-terms-conditions .page-title,
body.custom-page-privacy-policy .page-title,
body.custom-page-b2b-bulk-orders .page-title {
	margin: 0;
	font-family: var(--display, system-ui, sans-serif);
	font-size: clamp(2.3rem, 5vw, 3.6rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.04em;
	color: var(--ink, #1a1d1a);
}

body.custom-page-delivery-information .entry-thumb,
body.custom-page-return-refund-policy .entry-thumb,
body.custom-page-terms-conditions .entry-thumb,
body.custom-page-privacy-policy .entry-thumb,
body.custom-page-b2b-bulk-orders .entry-thumb { display: none; }

/* The intro paragraph, added as its own block under the title */
.short-description + .tl-doc { margin-top: 0; }

/* =========================================================
   2. WRAPPER
   ========================================================= */

.tl-doc {
	/* The single place the space under the page header is set, so it
	   holds whether or not an intro paragraph has been added */
	margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.tl-doc > *:first-child { margin-top: 0; }
.tl-doc > *:last-child { margin-bottom: 0; }

.tl-doc p { margin: 0 0 0.95rem; }

.tl-doc strong { color: var(--dc-ink); font-weight: 700; }

.tl-doc a {
	color: var(--dc-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.tl-doc a:hover { color: var(--dc-accent-dark); }

/* =========================================================
   3. HIGHLIGHT CARDS

   The three numbers most people open this page to find,
   answered before they have to read anything.
   ========================================================= */

.tl-doc__highlights {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.8rem;
	margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.tl-doc__hl {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 1.25rem 1.3rem;
	background: #fff;
	border: 1px solid var(--dc-border);
	border-radius: var(--dc-radius);
	box-shadow: var(--dc-shadow);
	transition: border-color 0.18s ease, transform 0.18s ease;
}

.tl-doc__hl:hover {
	border-color: var(--dc-ink);
	transform: translateY(-2px);
}

.tl-doc__hl-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 0.7rem;
	background: var(--dc-accent-soft);
	border-radius: 11px;
	color: var(--dc-accent);
}

.tl-doc__hl-icon svg { width: 20px; height: 20px; }

.tl-doc__hl-value {
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--dc-ink);
}

.tl-doc__hl-label {
	font-size: 0.87rem;
	line-height: 1.5;
	color: var(--dc-muted);
}

/* =========================================================
   4. JUMP LINKS
   ========================================================= */

.tl-doc__jump {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-bottom: clamp(1.4rem, 2.6vw, 1.9rem);
	padding-bottom: clamp(1.2rem, 2.4vw, 1.6rem);
	border-bottom: 1px solid var(--dc-border-soft);
}

.tl-doc__jump-label {
	width: 100%;
	margin-bottom: 0.3rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--dc-muted);
}

.tl-doc .tl-doc__jump a {
	padding: 0.42em 0.85em;
	background: #fff;
	border: 1px solid var(--dc-border);
	border-radius: 999px;
	color: var(--dc-ink);
	font-size: 0.86rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.tl-doc .tl-doc__jump a:hover {
	background: var(--dc-ink);
	border-color: var(--dc-ink);
	color: #fff;
}

/* =========================================================
   5. SECTIONS
   ========================================================= */

/*
 * The divider between sections gets space on both sides: padding below
 * the content, then margin before the next heading. Keeping both at the
 * same modest value stops the two from stacking into a large gap.
 */
.tl-doc__section {
	margin-bottom: clamp(1.1rem, 2vw, 1.5rem);
	padding-bottom: clamp(1.1rem, 2vw, 1.5rem);
	border-bottom: 1px solid var(--dc-border-soft);
}

.tl-doc__section:last-of-type {
	border-bottom: 0;
	padding-bottom: 0;
	margin-bottom: 0;
}

.tl-doc h2 {
	display: block;
	margin: 0 0 0.7rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: clamp(1.22rem, 2.3vw, 1.45rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--dc-ink);
	/* Keeps a heading clear of the sticky header when a jump link
	   lands on it */
	scroll-margin-top: calc(var(--header-height, 78px) + 24px);
}

.tl-doc h3 {
	margin: 1.4rem 0 0.5rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--dc-ink);
	scroll-margin-top: calc(var(--header-height, 78px) + 24px);
}

.tl-doc ul,
.tl-doc ol {
	margin: 0 0 0.95rem;
	padding-left: 1.25rem;
}

.tl-doc li { margin-bottom: 0.4rem; }
.tl-doc li::marker { color: var(--dc-accent); }

/* =========================================================
   6. TABLES

   Wrapped in .tl-doc__table so a wide table scrolls inside
   its own box instead of stretching the page sideways on a
   phone.
   ========================================================= */

.tl-doc__table {
	margin: 0 0 1rem;
	overflow-x: auto;
	background: #fff;
	border: 1px solid var(--dc-border);
	border-radius: var(--dc-radius);
	box-shadow: var(--dc-shadow);
	-webkit-overflow-scrolling: touch;
}

.tl-doc__table table {
	width: 100%;
	min-width: 420px;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.tl-doc__table th,
.tl-doc__table td {
	padding: 0.85rem 1.1rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--dc-border-soft);
}

.tl-doc__table thead th {
	background: var(--chalk, #f3f2ed);
	border-bottom: 1px solid var(--dc-border);
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--dc-muted);
	white-space: nowrap;
}

.tl-doc__table tbody tr:last-child th,
.tl-doc__table tbody tr:last-child td { border-bottom: 0; }

.tl-doc__table tbody tr:hover td,
.tl-doc__table tbody tr:hover th { background: rgba(26, 29, 26, 0.018); }

/* Second column carries the answer, so it reads as the answer */
.tl-doc__table td:last-child {
	font-weight: 600;
	color: var(--dc-ink);
	white-space: nowrap;
}

.tl-doc__table td:first-child { color: var(--dc-text); font-weight: 400; }

/* =========================================================
   7. CALLOUTS
   ========================================================= */

.tl-doc__note {
	display: flex;
	gap: 0.85rem;
	margin: 0 0 1rem;
	padding: 0.95rem 1.15rem;
	background: var(--chalk, #f3f2ed);
	border-radius: var(--dc-radius-sm);
	font-size: 0.93rem;
	line-height: 1.65;
}

.tl-doc__note--accent {
	background: var(--dc-accent-soft);
	border-left: 3px solid var(--dc-accent);
	border-radius: 0 var(--dc-radius-sm) var(--dc-radius-sm) 0;
}

.tl-doc__note-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-top: 0.22rem;
	color: var(--dc-accent);
}

.tl-doc__note-icon svg { width: 20px; height: 20px; }

.tl-doc__note p { margin: 0 0 0.5rem; }
.tl-doc__note p:last-child { margin-bottom: 0; }
.tl-doc__note strong { color: var(--dc-ink); }

/* =========================================================
   8. CLOSING CTA
   ========================================================= */

.tl-doc__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
	padding: clamp(1.4rem, 2.8vw, 1.9rem);
	background:
		radial-gradient(circle at 110% 10%, rgba(168, 64, 47, 0.45) 0%, rgba(168, 64, 47, 0) 60%),
		linear-gradient(160deg, #232723 0%, var(--dc-ink) 65%, #141714 100%);
	background-color: var(--dc-ink);
	border-radius: var(--dc-radius);
	color: #fff;
}

.tl-doc__cta-text { min-width: 0; }

/*
 * Written as .tl-doc .tl-doc__cta-title on purpose.
 *
 * This element is an <h2>, so the .tl-doc h2 rule above also matches it.
 * That rule is (0,1,1) and a lone class is (0,1,0), so it used to win and
 * paint the heading in the dark body colour - on the dark CTA panel, which
 * made the title unreadable. Adding the .tl-doc ancestor here takes the
 * specificity to (0,2,0) so the white sticks.
 */
.tl-doc .tl-doc__cta-title {
	display: block;
	margin: 0 0 0.3rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: clamp(1.1rem, 2.1vw, 1.35rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: #fff;
	/* Nothing links to it, so it needs no scroll offset */
	scroll-margin-top: 0;
}

.tl-doc .tl-doc__cta-sub {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.72);
}

.tl-doc .tl-doc__cta-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.95em 1.9em;
	background: var(--dc-accent);
	border-radius: var(--dc-radius-sm);
	color: #fff;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.92rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.18s ease, transform 0.18s ease, gap 0.18s ease;
}

.tl-doc .tl-doc__cta-btn:hover {
	background: var(--dc-accent-dark);
	transform: translateY(-2px);
	gap: 0.8rem;
	color: #fff;
}

.tl-doc__cta-btn svg { width: 17px; height: 17px; }

/* =========================================================
   9. LAST UPDATED
   ========================================================= */

.tl-doc .tl-doc__updated {
	margin: 1.1rem 0 0;
	text-align: center;
	font-size: 0.82rem;
	color: var(--dc-muted);
}

/* =========================================================
   10. RESPONSIVE
   ========================================================= */

@media (max-width: 860px) {
	.tl-doc__highlights { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
	.tl-doc__hl { padding: 1.1rem; }
	.tl-doc__hl-value { font-size: 1.1rem; }
}

@media (max-width: 700px) {
	/* Three across becomes unreadable before it becomes narrow, so
	   they stack rather than shrink further */
	.tl-doc__highlights { grid-template-columns: 1fr; }

	.tl-doc__hl {
		flex-direction: row;
		align-items: center;
		gap: 0.9rem;
		padding: 0.95rem 1.1rem;
	}

	.tl-doc__hl-icon { margin-bottom: 0; }

	.tl-doc__hl-text { min-width: 0; }
}

@media (max-width: 560px) {
	body.custom-page-delivery-information .site-main > .wrap-narrow,
	body.custom-page-return-refund-policy .site-main > .wrap-narrow,
	body.custom-page-terms-conditions .site-main > .wrap-narrow,
	body.custom-page-privacy-policy .site-main > .wrap-narrow,
	body.custom-page-b2b-bulk-orders .site-main > .wrap-narrow {
		width: min(100% - 1.75rem, 880px);
	}

	.tl-doc { font-size: 0.97rem; }

	.tl-doc__table th,
	.tl-doc__table td { padding: 0.7rem 0.85rem; font-size: 0.9rem; }

	.tl-doc__note { padding: 0.9rem 1rem; font-size: 0.91rem; }

	.tl-doc__cta { flex-direction: column; align-items: flex-start; }
	.tl-doc .tl-doc__cta-btn { width: 100%; justify-content: center; }
}

/* =========================================================
   11. MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.tl-doc__hl,
	.tl-doc .tl-doc__jump a,
	.tl-doc .tl-doc__cta-btn { transition: none !important; }

	.tl-doc__hl:hover,
	.tl-doc .tl-doc__cta-btn:hover { transform: none; }
}