.ti-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Baskervville Variable", serif;
}
.ti-popup[hidden] { display: none; }

.ti-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(40, 32, 34, 0.75);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.ti-popup__panel {
	position: relative;
	background-color: #282022;
	outline: none;
	border: 1px solid rgba(132, 105, 101, 0.8);
	border-radius: 1rem;
	max-width: 560px;
	width: calc(100% - 4rem);
	box-sizing: border-box;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow-y: auto;
	padding: 3rem 2.5rem;
	text-align: center;
	color: #CCC0BC;
	opacity: 0;
	transform: scale(0.96);
	transition: opacity 250ms ease, transform 250ms ease;
}
.ti-popup.is-open .ti-popup__panel {
	opacity: 1;
	transform: scale(1);
}

.ti-popup__image img {
	width: 100%;
	max-height: 220px;
	object-fit: cover;
	border-radius: 0.75rem;
	display: block;
	margin-bottom: 1.5rem;
}

.ti-popup__title {
	color: #E5DEDC;
	font-weight: 700;
	margin: 0 0 1rem;
	padding: 0 1.5rem;
	overflow-wrap: break-word;
}
.ti-popup__image + .ti-popup__title { padding: 0; }

.ti-popup__panel:focus,
.ti-popup__close:focus,
.ti-popup__button:focus { outline: none; box-shadow: none; }
.ti-popup__close:focus-visible,
.ti-popup__button:focus-visible { box-shadow: 0 0 0 2px #282022, 0 0 0 4px #AF9B95; }

.ti-popup__content a { color: #E5DEDC; }

.ti-popup__button {
	display: inline-block;
	margin-top: 1.5rem;
	border-radius: 100px;
	background: #846965;
	border: 1px solid #846965;
	color: #E5DEDC;
	font-weight: 700;
	font-size: 1.25rem;
	padding: 0.625rem 3.75rem;
	text-decoration: none;
	transition: background 200ms ease;
}
.ti-popup__button:hover,
.ti-popup__button:focus {
	background: #6f5753;
	border-color: #6f5753;
	color: #E5DEDC;
}

.ti-popup__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(229, 222, 220, 0.4);
	background: transparent;
	color: #E5DEDC;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 200ms ease;
}
.ti-popup__close:hover,
.ti-popup__close:focus {
	background: #846965;
}

html.ti-popup-locked { overflow: hidden; }

@media (max-width: 575.98px) {
	.ti-popup__panel {
		width: calc(100% - 2rem);
		padding: 2.25rem 1.5rem;
	}
	.ti-popup__title { font-size: 1.5rem; padding: 0 2.5rem; }
	.ti-popup__close { top: 0.75rem; right: 0.75rem; width: 36px; height: 36px; }
	.ti-popup__button {
		font-size: 0.875em;
		padding: 0.625rem 2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ti-popup__panel { transition: none; }
}
