/* Welcome popup (travel-core). Designs: boarding pass (default), postcard, minimal. Colours come from the
   settings as --tcwp-primary, --tcwp-accent, --tcwp-bg and --tcwp-dim (inline style). */

.tcwp-overlay {
	--tcwp-ink: #1b2430;
	--tcwp-muted: #56616c;
	--tcwp-stub: 128px;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(9, 26, 29, var(--tcwp-dim, .8));
	opacity: 0;
	transition: opacity .25s ease;
}
.tcwp-overlay[hidden] { display: none; }
.tcwp-overlay.is-open { opacity: 1; }
.tcwp-at-bottom { align-items: flex-end; }

.tcwp-card {
	position: relative;
	width: min(620px, 100%);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	outline: none;
	filter: drop-shadow(0 22px 40px rgba(9, 26, 29, .35));
	transform: translateY(18px) rotate(-1.2deg) scale(.97);
	transition: transform .35s cubic-bezier(.2, .9, .3, 1.25);
	color: var(--tcwp-ink);
	text-align: left;
}
.tcwp-overlay.is-open .tcwp-card { transform: none; }
.tcwp-card { cursor: pointer; }
.tcwp-pass { transition: transform .2s ease; }
.tcwp-card:hover .tcwp-pass { transform: translateY(-3px); }
.tcwp-card:hover .tcwp-cta { filter: brightness(.94); }
.tcwp-close { cursor: pointer; }

/* The pass: ticket + stub, with punched notches on the perforation. */
.tcwp-pass {
	display: grid;
	grid-template-columns: 1fr var(--tcwp-stub);
	overflow: hidden auto;
	max-height: inherit;
	border-radius: 20px;
	background: var(--tcwp-bg, #fffaf2);
	-webkit-mask:
		radial-gradient(circle 13px at calc(100% - var(--tcwp-stub)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
		radial-gradient(circle 13px at calc(100% - var(--tcwp-stub)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
	mask:
		radial-gradient(circle 13px at calc(100% - var(--tcwp-stub)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
		radial-gradient(circle 13px at calc(100% - var(--tcwp-stub)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
}

.tcwp-route {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 22px 14px;
	background: var(--tcwp-primary, #0f5e66);
	color: #fff;
}
.tcwp-leg { display: flex; flex-direction: column; min-width: 0; max-width: 60%; }
.tcwp-leg-to { text-align: right; }
.tcwp-label {
	font-size: .66rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	opacity: .72;
}
.tcwp-place {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.18rem;
	font-weight: 700;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* The plane flies from the left edge to the destination, leaving a dashed trail. */
.tcwp-flight { position: relative; flex: 1 1 auto; min-width: 60px; height: 24px; }
.tcwp-trail {
	position: absolute;
	left: 0;
	top: 50%;
	width: calc(100% - 26px);
	border-top: 2px dashed rgba(255, 255, 255, .55);
}
.tcwp-plane { position: absolute; top: 0; left: calc(100% - 26px); width: 24px; height: 24px; color: #fff; }

.tcwp-body { display: flex; gap: 18px; padding: 20px 22px 6px; align-items: flex-start; }
.tcwp-photo {
	flex: 0 0 auto;
	width: 92px;
	height: 92px;
	object-fit: cover;
	border: 4px solid #fff;
	border-radius: 6px;
	box-shadow: 0 6px 14px rgba(9, 26, 29, .18);
	transform: rotate(-4deg);
}
.tcwp-copy { min-width: 0; }
.tcwp-badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--tcwp-accent, #d9643a) 14%, transparent);
	color: var(--tcwp-accent, #d9643a);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.tcwp-title {
	margin: 0 0 8px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.25rem, 1rem + 1.2vw, 1.6rem);
	line-height: 1.2;
	color: var(--tcwp-ink);
}
.tcwp-text { margin: 0 0 10px; color: var(--tcwp-muted); font-size: .95rem; line-height: 1.55; }
.tcwp-points { margin: 0; padding: 0; list-style: none; font-size: .92rem; }
.tcwp-points li { position: relative; padding: 3px 0 3px 26px; }
.tcwp-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--tcwp-primary, #0f5e66) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.tcwp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 22px 20px; }
.tcwp-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 24px;
	border-radius: 999px;
	background: var(--tcwp-accent, #d9643a);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 8px 18px color-mix(in srgb, var(--tcwp-accent, #d9643a) 35%, transparent);
	transition: transform .15s ease, filter .15s ease;
}
.tcwp-cta:hover, .tcwp-cta:focus-visible { filter: brightness(.94); transform: translateY(-1px); }

.tcwp-stub {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 54px 12px 18px;
	border-left: 2px dashed color-mix(in srgb, var(--tcwp-ink) 22%, transparent);
	background: color-mix(in srgb, var(--tcwp-primary, #0f5e66) 7%, var(--tcwp-bg, #fffaf2));
	text-align: center;
}
.tcwp-stub-label { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tcwp-muted); }
.tcwp-stub-hotel {
	flex: 1 1 auto;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	max-height: 210px;
	overflow: hidden;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--tcwp-primary, #0f5e66);
	text-overflow: ellipsis;
	white-space: nowrap;
}
.tcwp-barcode {
	display: block;
	width: 100%;
	height: 44px;
	background: repeating-linear-gradient(90deg, var(--tcwp-ink) 0 2px, transparent 2px 4px, var(--tcwp-ink) 4px 5px, transparent 5px 8px, var(--tcwp-ink) 8px 11px, transparent 11px 12px, var(--tcwp-ink) 12px 13px, transparent 13px 16px);
	opacity: .85;
}

.tcwp-close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	/* Discreet on purpose (user, 2026-10-27): the popup should be closed as little as possible. */
	color: rgba(255, 255, 255, .45);
	font-size: 14px;
	line-height: 18px;
	cursor: pointer;
}
.tcwp-close:hover, .tcwp-close:focus-visible { background: none; color: rgba(255, 255, 255, .8); }
.tcwp-postcard .tcwp-close, .tcwp-minimal .tcwp-close { color: color-mix(in srgb, var(--tcwp-ink) 30%, transparent); }
.tcwp-postcard .tcwp-close:hover, .tcwp-minimal .tcwp-close:hover { color: color-mix(in srgb, var(--tcwp-ink) 60%, transparent); }

.tcwp-stamp {
	position: absolute;
	top: 58px;
	right: calc(var(--tcwp-stub) + 18px);
	z-index: 1;
	display: grid;
	place-items: center;
	width: 88px;
	height: 88px;
	padding: 10px;
	border: 3px double var(--tcwp-accent, #d9643a);
	border-radius: 50%;
	color: var(--tcwp-accent, #d9643a);
	font-size: .62rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .1em;
	text-align: center;
	text-transform: uppercase;
	transform: rotate(-14deg);
	opacity: .82;
	pointer-events: none;
}

/* Animations (only when enabled and the visitor accepts motion). */
@media (prefers-reduced-motion: no-preference) {
	.tcwp-animate.is-open .tcwp-stamp { animation: tcwp-stamp .55s cubic-bezier(.2, .9, .3, 1.4) .45s both; }
	.tcwp-animate.is-open .tcwp-plane { animation: tcwp-fly 1.8s cubic-bezier(.45, .05, .2, 1) .25s both; }
	.tcwp-animate.is-open .tcwp-trail { animation: tcwp-trail 1.8s cubic-bezier(.45, .05, .2, 1) .25s both; }
	.tcwp-animate.is-open .tcwp-photo { animation: tcwp-drop .5s cubic-bezier(.2, .9, .3, 1.3) .2s both; }
}
@keyframes tcwp-stamp {
	0% { opacity: 0; transform: rotate(-30deg) scale(2.2); }
	70% { opacity: .9; transform: rotate(-12deg) scale(.94); }
	100% { opacity: .82; transform: rotate(-14deg) scale(1); }
}
@keyframes tcwp-fly {
	0% { left: 0; transform: translateY(5px) rotate(-8deg); }
	55% { transform: translateY(-3px) rotate(-3deg); }
	100% { left: calc(100% - 26px); transform: none; }
}
@keyframes tcwp-trail {
	from { width: 0; }
}
@keyframes tcwp-drop {
	from { opacity: 0; transform: rotate(-12deg) translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
	.tcwp-overlay, .tcwp-card { transition: none; }
}
.tcwp-overlay:not(.tcwp-animate), .tcwp-overlay:not(.tcwp-animate) .tcwp-card { transition: none; }

/* Postcard: airmail border, stamp in the corner, no stub. */
.tcwp-postcard .tcwp-pass {
	grid-template-columns: 1fr;
	padding: 9px;
	background: repeating-linear-gradient(135deg, var(--tcwp-accent, #d9643a) 0 14px, #fff 14px 28px, var(--tcwp-primary, #0f5e66) 28px 42px, #fff 42px 56px);
	-webkit-mask: none;
	mask: none;
}
.tcwp-postcard .tcwp-ticket { border-radius: 12px; background: var(--tcwp-bg, #fffaf2); overflow: hidden; }
.tcwp-postcard .tcwp-stub { display: none; }
.tcwp-postcard .tcwp-route { background: none; color: var(--tcwp-primary, #0f5e66); border-bottom: 2px dashed color-mix(in srgb, var(--tcwp-ink) 18%, transparent); }
.tcwp-postcard .tcwp-plane { color: var(--tcwp-accent, #d9643a); }
.tcwp-postcard .tcwp-trail { border-top-color: color-mix(in srgb, var(--tcwp-ink) 30%, transparent); }
.tcwp-postcard .tcwp-stamp { top: 64px; right: 26px; }
.tcwp-postcard .tcwp-copy { padding-right: 70px; }

/* Minimal: plain card, no route band, stub or stamp. */
.tcwp-minimal .tcwp-pass { grid-template-columns: 1fr; border-radius: 16px; -webkit-mask: none; mask: none; }
.tcwp-minimal .tcwp-route, .tcwp-minimal .tcwp-stub, .tcwp-minimal .tcwp-stamp { display: none; }
.tcwp-minimal .tcwp-body { padding-top: 26px; }

/* Phones: the stub becomes a tear-off strip at the bottom. */
@media (max-width: 600px) {
	.tcwp-overlay { padding: 10px; }
	.tcwp-at-bottom .tcwp-card { width: 100%; }
	.tcwp-pass { grid-template-columns: 1fr; -webkit-mask: none; mask: none; }
	.tcwp-stub {
		flex-direction: row;
		padding: 12px 18px;
		border-left: 0;
		border-top: 2px dashed color-mix(in srgb, var(--tcwp-ink) 22%, transparent);
	}
	.tcwp-stub-hotel { writing-mode: horizontal-tb; transform: none; max-height: none; flex: 1 1 auto; text-align: left; }
	.tcwp-barcode { width: 84px; height: 30px; flex: 0 0 auto; }
	.tcwp-route { padding: 14px 30px 12px 18px; }
	.tcwp-leg { max-width: 74%; }
	.tcwp-flight { min-width: 44px; }
	/* Long destination names wrap onto a second line instead of being cut. */
	.tcwp-place { font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
	.tcwp-body { padding: 16px 18px 4px; gap: 14px; }
	.tcwp-photo { width: 64px; height: 64px; }
	.tcwp-stamp { top: 70px; right: 14px; width: 64px; height: 64px; padding: 5px; font-size: .46rem; letter-spacing: .04em; }
	.tcwp-copy { padding-right: 52px; }
	.tcwp-actions { padding: 14px 18px 16px; }
	.tcwp-cta { flex: 1 1 100%; }
	.tcwp-postcard .tcwp-copy { padding-right: 0; }
}
