/* TT Inspiration Gallery */

.ttig {
	--ttig-ink: var(--color-coal, #373a37);
	--ttig-accent: var(--color-earth, #836140);
	--ttig-line: #e6e6e6;
	--ttig-muted: #b8b8b8;
	--ttig-soft: #f6f6f6;
	--ttig-radius: 30px;
	--ttig-heading-font: var(--e-global-typography-primary-font-family, inherit);
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin: 0 0 24px;
	color: var(--ttig-ink);
}

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

.ttig [hidden] {
	display: none !important;
}

html.ttig-lock {
	overflow: hidden;
}

.ttig .ttig-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Buttons: neutralise theme styles first, every component then adds its own skin. */
.ttig button.ttig-b,
.ttig button.ttig-b:hover,
.ttig button.ttig-b:focus,
.ttig button.ttig-b:active {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	min-height: 0;
	width: auto;
	cursor: pointer;
}

.ttig button.ttig-b:focus-visible,
.ttig .ttig-combo__trigger:focus-visible {
	outline: 2px solid var(--ttig-ink);
	outline-offset: 2px;
}

/* ---------- Grid ---------- */

.ttig .ttig__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	width: 100%;
}

.ttig button.ttig-b.ttig__tile {
	display: flex;
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--ttig-soft);
}

.ttig button.ttig-b.ttig__tile[hidden] {
	display: none;
}

/* Image optimisation plugins may wrap the photo in a <picture> element: size it whatever its depth. */
.ttig .ttig__tile picture {
	position: absolute;
	inset: 0;
	display: block;
}

.ttig .ttig__tile img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ttig .ttig__expand {
	position: absolute;
	right: 15px;
	bottom: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
}

.ttig .ttig__expand svg {
	width: 14px;
	height: 14px;
}

.ttig .ttig__expand > span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.ttig .ttig__empty {
	width: 100%;
	margin: 24px 0 0;
	text-align: center;
}

.ttig button.ttig-b.ttig__more,
.ttig button.ttig-b.ttig-btn {
	margin-top: 24px;
	padding: 15px 44px;
	border-radius: var(--ttig-radius);
	background: var(--ttig-ink);
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	transition: background-color 0.2s linear;
}

.ttig button.ttig-b.ttig__more:hover,
.ttig button.ttig-b.ttig-btn:hover {
	background: var(--ttig-accent);
}

/* ---------- Filter bar ---------- */

.ttig .ttig-filters {
	position: sticky;
	top: var(--ttig-sticky-top, 0px);
	z-index: 10;
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
}

.ttig .ttig-filters__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	width: 100%;
	padding: 12px 0;
}

.ttig .ttig-filters__title {
	display: none;
	font-family: var(--ttig-heading-font);
	font-size: 26px;
	line-height: 34px;
	color: #000;
}

.ttig .ttig-filters__actions {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.ttig button.ttig-b.ttig-clear {
	color: var(--ttig-accent);
	font-size: 16px;
	font-weight: 700;
	line-height: 16px;
	text-transform: uppercase;
}

.ttig button.ttig-b.ttig-clear:disabled {
	color: var(--ttig-muted);
	cursor: not-allowed;
}

.ttig button.ttig-b.ttig-filters__open {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 20px;
	border: 1px solid var(--ttig-ink);
	border-radius: var(--ttig-radius);
	color: var(--ttig-ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 20px;
	text-transform: uppercase;
	transition: background-color 0.2s linear, color 0.2s linear;
}

.ttig button.ttig-b.ttig-filters__open:hover {
	background: var(--ttig-ink);
	color: #fff;
}

.ttig .ttig-filters__open svg {
	width: 20px;
	height: 20px;
}

.ttig .ttig-filters__desktop {
	display: none;
	gap: 20px;
	width: 100%;
}

.ttig .ttig-filters__selected {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	overflow-x: auto;
}

.ttig .ttig-filters__selected:not(:empty) {
	padding: 0 0 24px;
}

.ttig button.ttig-b.ttig-pill {
	display: flex;
	flex: none;
	align-items: center;
	gap: 10px;
	padding: 4px 12px;
	border-radius: var(--ttig-radius);
	background: var(--ttig-ink);
	color: #fff;
	font-size: 14px;
	line-height: 24px;
	white-space: nowrap;
}

.ttig button.ttig-b.ttig-pill:hover {
	background: var(--ttig-accent);
}

.ttig .ttig-pill::after {
	content: "\00d7";
	font-size: 20px;
	line-height: 1;
}

/* ---------- Filter groups (desktop dropdowns, inline lists in the mobile panel) ---------- */

.ttig .ttig-combo {
	position: relative;
	flex: 0 1 260px;
	min-width: 0;
}

.ttig .ttig-combo__trigger {
	display: block;
	padding: 11px 16px;
	border: 1px solid var(--ttig-muted);
	background: #fff;
	color: var(--ttig-ink);
	font-size: 16px;
	line-height: 24px;
	list-style: none;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

.ttig .ttig-combo__trigger::-webkit-details-marker {
	display: none;
}

.ttig .ttig-combo__trigger::marker {
	content: "";
}

.ttig .ttig-combo__in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ttig .ttig-combo__in svg {
	flex: none;
	width: 14px;
	height: 14px;
	transform: rotate(90deg);
	transition: transform 0.2s ease;
}

.ttig .ttig-combo[open] > .ttig-combo__trigger svg {
	transform: rotate(-90deg);
}

.ttig .ttig-combo__list {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 20;
	max-height: 320px;
	margin: 0;
	padding: 0;
	overflow: auto;
	border: 1px solid var(--ttig-muted);
	border-top: 0;
	background: #fff;
	list-style: none;
}

.ttig .ttig-combo__list li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--ttig-line);
	list-style: none;
}

.ttig .ttig-combo__list li:last-child {
	border-bottom: 0;
}

.ttig .ttig-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 10px 16px;
	color: var(--ttig-ink);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	cursor: pointer;
}

.ttig .ttig-opt:hover {
	background: var(--ttig-soft);
}

.ttig .ttig-opt input {
	-webkit-appearance: auto;
	appearance: auto;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--ttig-ink);
}

/* ---------- Filter panel (mobile and tablet) ---------- */

@keyframes ttig-in {
	from { transform: translateX(-100%); }
	to { transform: translateX(0); }
}

@keyframes ttig-out {
	from { transform: translateX(0); }
	to { transform: translateX(-100%); }
}

.ttig dialog.ttig-fdialog {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	max-width: 400px;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--ttig-ink);
	transform: translateX(-100%);
}

.ttig dialog.ttig-fdialog[open] {
	animation: ttig-in 0.3s ease-in-out forwards;
}

.ttig dialog.ttig-fdialog.is-closing {
	animation: ttig-out 0.3s ease-in-out forwards;
}

.ttig dialog.ttig-fdialog::backdrop {
	background: rgba(19, 19, 19, 0.75);
}

.ttig button.ttig-b.ttig-fdialog__close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--ttig-ink);
}

.ttig .ttig-fdialog__content {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow-y: auto;
}

.ttig .ttig-fdialog__title {
	padding: 20px 20px 24px;
	font-family: var(--ttig-heading-font);
	font-size: 26px;
	line-height: 34px;
	color: #000;
}

.ttig .ttig-fdialog__groups {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0 20px 20px;
}

.ttig .ttig-fdialog .ttig-combo {
	flex: none;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ttig-line);
}

.ttig .ttig-fdialog .ttig-combo__trigger {
	padding: 0;
	border: 0;
	font-family: var(--ttig-heading-font);
	font-size: 18px;
	line-height: 25px;
}

.ttig .ttig-fdialog .ttig-combo__list {
	position: static;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: none;
	margin-top: 16px;
	border: 0;
}

.ttig .ttig-fdialog .ttig-combo__list li {
	border: 0;
}

.ttig .ttig-fdialog .ttig-opt {
	padding: 0 8px;
}

.ttig .ttig-fdialog__actions {
	position: sticky;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: auto;
	padding: 24px 57px;
	border-top: 1px solid var(--ttig-muted);
	background: #fff;
}

.ttig .ttig-fdialog__actions button.ttig-b.ttig-btn {
	width: 100%;
	margin-top: 0;
}

.ttig .ttig-fdialog__actions button.ttig-b.ttig-clear {
	width: 100%;
	text-align: center;
}

/* ---------- Photo viewer ---------- */

/* Photo and caption share one column, sized on the 14:9 photo format and on the screen height,
   so the caption always sits right under the photo and stays on screen. */
.ttig dialog.ttig-dialog {
	--ttig-w: max(240px, min(1180px, 100vw, calc((100vh - 230px) * 14 / 9)));
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: #000;
	color: #fff;
}

.ttig dialog.ttig-dialog::backdrop {
	background: #000;
}

.ttig button.ttig-b.ttig-dialog__close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 20px;
	color: #fff;
	font-size: 16px;
	line-height: 24px;
}

.ttig button.ttig-b.ttig-dialog__close:focus-visible,
.ttig button.ttig-b.ttig-carousel__btn:focus-visible {
	outline-color: #fff;
}

.ttig .ttig-x {
	position: relative;
	display: block;
	width: 24px;
	height: 24px;
}

.ttig .ttig-x::before,
.ttig .ttig-x::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transform: translate(-50%, -50%) rotate(45deg);
}

.ttig .ttig-x::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.ttig .ttig-dialog__content {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow-y: auto;
}

.ttig .ttig-carousel {
	display: flex;
	flex: none;
	margin-top: auto;
	flex-direction: column;
	align-items: center;
	width: 100%;
	min-height: 0;
	overflow: hidden;
	outline: 0;
}

.ttig .ttig-carousel__counter {
	padding: 20px 0;
	font-size: 16px;
	line-height: 24px;
}

.ttig .ttig-carousel__slides {
	position: relative;
	flex: none;
	width: 100%;
	height: calc(var(--ttig-w) * 9 / 14);
}

.ttig .ttig-carousel__wrap {
	position: absolute;
	inset: 0;
	width: var(--ttig-w);
	max-width: 100%;
	margin: 0 auto;
}

.ttig .ttig-carousel__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.ttig .ttig-carousel__slide.is-active {
	opacity: 1;
	visibility: visible;
}

.ttig .ttig-carousel__slide img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}

.ttig button.ttig-b.ttig-carousel__btn {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 2px solid transparent;
	border-radius: 50%;
	background: rgba(246, 246, 246, 0.75);
	color: #000;
	transform: translateY(-50%);
}

.ttig button.ttig-b.ttig-carousel__btn:hover {
	background: rgba(246, 246, 246, 0.9);
}

.ttig button.ttig-b.ttig-carousel__btn--prev {
	left: 10px;
}

.ttig button.ttig-b.ttig-carousel__btn--next {
	right: 10px;
}

.ttig .ttig-carousel__btn svg {
	width: 16px;
	height: 16px;
}

.ttig .ttig-carousel__btn--prev svg {
	transform: rotate(180deg);
}

.ttig .ttig-dialog__desc {
	flex: none;
	width: var(--ttig-w);
	max-width: 100%;
	margin: 0 auto auto;
	padding: 20px;
	color: #fff;
	font-size: 16px;
	line-height: 24px;
}

.ttig .ttig-dialog__desc p {
	margin: 0;
	color: #fff;
}

.ttig .ttig-dialog__desc p + p {
	margin-top: 12px;
}

.ttig .ttig-dialog__desc a {
	color: #fff;
	text-decoration: underline;
}

.ttig .ttig-dialog__desc a:hover,
.ttig .ttig-dialog__desc a:focus {
	color: #c9c9c9;
}

/* ---------- Tablet ---------- */

@media (min-width: 768px) {
	.ttig .ttig__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
	.ttig {
		gap: 48px;
		margin: 28px 0 48px;
	}

	.ttig .ttig__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 32px;
	}

	.ttig .ttig__empty,
	.ttig button.ttig-b.ttig__more {
		margin-top: 0;
	}

	.ttig .ttig-filters {
		position: static;
	}

	.ttig .ttig-filters__title {
		display: block;
	}

	.ttig .ttig-filters__actions {
		justify-content: flex-end;
		width: auto;
	}

	.ttig button.ttig-b.ttig-filters__open {
		display: none;
	}

	.ttig .ttig-filters__desktop {
		display: flex;
	}

	.ttig .ttig-filters__selected {
		flex-wrap: wrap;
	}

	.ttig .ttig-filters__selected:not(:empty) {
		padding: 16px 0 0;
	}

	.ttig dialog.ttig-fdialog {
		max-width: 500px;
	}

	.ttig .ttig__expand {
		inset: 0;
		flex-direction: column;
		gap: 4px;
		width: auto;
		height: auto;
		border-radius: 0;
		font-size: 16px;
		line-height: 24px;
		opacity: 0;
		transition: opacity 0.2s linear;
	}

	.ttig .ttig__expand svg {
		width: 30px;
		height: 30px;
	}

	.ttig .ttig__expand > span {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}

	.ttig .ttig__tile:focus-visible .ttig__expand {
		opacity: 1;
	}

	.ttig .ttig-carousel__counter {
		padding: 40px 0;
	}

	.ttig button.ttig-b.ttig-carousel__btn {
		width: 64px;
		height: 64px;
	}

	.ttig .ttig-carousel__btn svg {
		width: 32px;
		height: 32px;
	}

	.ttig button.ttig-b.ttig-dialog__close {
		padding: 40px;
	}

	.ttig .ttig-dialog__desc {
		padding: 24px;
	}
}

@media (min-width: 1024px) and (hover: hover) {
	.ttig .ttig__tile:hover .ttig__expand {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ttig .ttig-carousel__slide,
	.ttig .ttig__expand,
	.ttig .ttig-combo__in svg {
		transition: none;
	}

	.ttig dialog.ttig-fdialog[open],
	.ttig dialog.ttig-fdialog.is-closing {
		animation-duration: 0.01s;
	}
}
