/* Tigers Wings Popup – front end */

.twp-popup {
	--twp-accent: #d4141c;
	--twp-bg: #ffffff;
	--twp-text: #1f2937;
	--twp-radius: 16px;
	--twp-w: 720px;
	--twp-pad: clamp(12px, 3vw, 32px);
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--twp-pad);
	font-size: 16px;
	line-height: 1.6;
}
.twp-popup[hidden] { display: none !important; }
.twp-popup *,
.twp-popup *::before,
.twp-popup *::after { box-sizing: border-box; }

.twp-size-small  { --twp-w: 480px; }
.twp-size-medium { --twp-w: 720px; }
.twp-size-large  { --twp-w: 1080px; }

/* Overlay */
.twp-overlay {
	position: absolute;
	inset: 0;
	background: rgba(9, 13, 22, 0.72);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

/* Dialog */
.twp-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--twp-w);
	max-height: calc(100vh - 2 * var(--twp-pad));
	max-height: calc(100dvh - 2 * var(--twp-pad));
	overflow: hidden;
	background: var(--twp-bg);
	color: var(--twp-text);
	border-radius: var(--twp-radius);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
	outline: none;
}
.twp-anim-zoom .twp-dialog     { transform: scale(0.94); }
.twp-anim-slide-up .twp-dialog { transform: translateY(40px); }
.twp-popup.is-open .twp-overlay,
.twp-popup.is-open .twp-dialog { opacity: 1; transform: none; }

.twp-inner {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* Close button */
.twp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #111827;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}
.twp-close:hover { transform: rotate(90deg); background: #fff; }
.twp-close:focus-visible { outline: 3px solid var(--twp-accent); outline-offset: 2px; }

/* Hero image */
.twp-hero { margin: 0; overflow: hidden; }
.twp-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.twp-img-top .twp-hero { aspect-ratio: 16 / 7; }

/* Side image: the image keeps its own proportions at full popup height,
   and only the content column scrolls. */
.twp-img-left .twp-dialog,
.twp-img-right .twp-dialog {
	height: min(760px, calc(100vh - 2 * var(--twp-pad)));
	height: min(760px, calc(90dvh - 2 * var(--twp-pad)));
}
.twp-img-left .twp-inner,
.twp-img-right .twp-inner {
	display: flex;
	align-items: stretch;
	overflow: hidden;
}
.twp-img-left .twp-hero,
.twp-img-right .twp-hero {
	flex: 0 0 50%;
	height: 100%;
	max-width: 50%;
	background: #0b1e5b;
}
.twp-img-left .twp-hero img,
.twp-img-right .twp-hero img { object-position: left center; }
.twp-img-right .twp-hero { order: 2; }
.twp-img-right .twp-hero img { object-position: right center; }
.twp-img-left .twp-body,
.twp-img-right .twp-body {
	display: flex;
	flex: 0 0 50%;
	flex-direction: column;
	justify-content: safe center;
	min-width: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: clamp(24px, 3vw, 44px);
	padding-right: clamp(40px, 4vw, 60px); /* room for the close button */
}
.twp-img-right .twp-body { padding-left: clamp(24px, 3vw, 44px); }
/* The embedded form already has its own card, so don't box it twice. */
.twp-img-left .twp-form-wrap,
.twp-img-right .twp-form-wrap {
	margin-top: 0;
	padding: 0;
	border: 0;
	background: none;
}
/* Side image + form: the form column is one solid navy panel, no white gaps. */
.twp-img-left.twp-has-form,
.twp-img-right.twp-has-form {
	--twp-side-bg: linear-gradient(160deg, #1e3a9c 0%, #12236f 50%, #0a1650 100%);
}
.twp-img-left.twp-has-form .twp-dialog,
.twp-img-right.twp-has-form .twp-dialog { background: #0f1f6b; }
.twp-img-left.twp-has-form .twp-body,
.twp-img-right.twp-has-form .twp-body {
	background: var(--twp-side-bg);
	color: #fff;
	padding: 16px 28px 16px 16px;
}
.twp-img-right.twp-has-form .twp-body { padding: 16px 28px; }
.twp-img-left.twp-has-form .twp-hero,
.twp-img-right.twp-has-form .twp-hero { background: #0f1f6b; }
/* Strip the form's own card so it sits straight on the navy panel. */
.twp-img-left.twp-has-form .twp-form-wrap :where(div, section, article, aside, form, fieldset),
.twp-img-right.twp-has-form .twp-form-wrap :where(div, section, article, aside, form, fieldset) {
	background: transparent !important;
	box-shadow: none !important;
}
.twp-img-left.twp-has-form .twp-form-wrap,
.twp-img-right.twp-has-form .twp-form-wrap { color: #fff; }
/* No heading, no leftover card padding: the panel padding sets the spacing. */

.twp-img-left.twp-has-form .twp-form-wrap :where(div, section, article, aside, form, fieldset),
.twp-img-right.twp-has-form .twp-form-wrap :where(div, section, article, aside, form, fieldset) {
	padding: 0 !important;
	border-radius: 0 !important;
}
.twp-img-left.twp-has-form .twp-body,
.twp-img-right.twp-has-form .twp-body { padding: 32px clamp(28px, 2vw, 56px); }
.twp-img-left.twp-has-form .twp-form-wrap label,
.twp-img-right.twp-has-form .twp-form-wrap label { margin-bottom: 6px; }
/* 40px fields. */
.twp-img-left.twp-has-form .twp-form-wrap :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]), select),
.twp-img-right.twp-has-form .twp-form-wrap :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]), select) {
	height: 40px !important;
	min-height: 40px !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	line-height: 40px;
}
.twp-img-left.twp-has-form .twp-qf,
.twp-img-right.twp-has-form .twp-qf { padding: clamp(16px, 2.5vw, 32px); }

.twp-img-left .twp-title + .twp-form-wrap,
.twp-img-right .twp-title + .twp-form-wrap,
.twp-img-left .twp-content + .twp-form-wrap,
.twp-img-right .twp-content + .twp-form-wrap { margin-top: 1.25em; }

.twp-img-background .twp-inner {
	position: relative;
	background-size: cover;
	background-position: center;
	color: #fff;
}
.twp-img-background .twp-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.75));
	pointer-events: none;
}
.twp-img-background .twp-body { position: relative; }
.twp-img-background .twp-section { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }

/* Body */
.twp-body { padding: clamp(22px, 4vw, 44px); }
.twp-align-center .twp-body { text-align: center; }
.twp-popup .twp-title {
	margin: 0 0 0.5em;
	padding-right: 36px;
	font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem);
	line-height: 1.2;
	font-weight: 700;
	color: inherit;
}
.twp-align-center .twp-title { padding: 0 36px; }
.twp-content > :first-child { margin-top: 0; }
.twp-content > :last-child { margin-bottom: 0; }
.twp-content img { max-width: 100%; height: auto; }
.twp-content a:not(.twp-btn) { color: var(--twp-accent); }

/* Dynamic sections grid */
.twp-sections {
	--twp-cols: 1;
	display: grid;
	grid-template-columns: repeat(var(--twp-cols), minmax(0, 1fr));
	gap: clamp(14px, 2vw, 24px);
	margin-top: 1.5em;
	text-align: left;
}
.twp-cols-2 { --twp-cols: 2; }
.twp-cols-3 { --twp-cols: 3; }
.twp-align-center .twp-sections { text-align: center; }

.twp-section {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(127, 127, 127, 0.18);
	border-radius: 12px;
	background: rgba(127, 127, 127, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.twp-section:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); }
.twp-cols-1 .twp-section { flex-direction: row; }
.twp-cols-1 .twp-section-media { flex: 0 0 38%; }

.twp-section-media { margin: 0; }
.twp-section-media img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.twp-section-body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.twp-popup .twp-section-title { margin: 0 0 0.35em; font-size: 1.1rem; line-height: 1.3; font-weight: 700; color: inherit; }
.twp-section-text { flex: 1; font-size: 0.95rem; opacity: 0.85; }
.twp-section-text p { margin: 0 0 0.6em; }
.twp-section-text p:last-child { margin-bottom: 0; }
.twp-section .twp-btn { align-self: flex-start; margin-top: 14px; }
.twp-align-center .twp-section .twp-btn { align-self: center; }

/* Buttons (also used for [tw_popup] triggers) */
.twp-btn,
a.twp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	padding: 0.8em 1.6em;
	border: 2px solid var(--twp-accent, #d4141c);
	border-radius: 999px;
	background: var(--twp-accent, #d4141c);
	color: #fff;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.twp-btn:hover,
.twp-btn:focus-visible { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.twp-btn-outline,
a.twp-btn-outline { background: transparent; color: var(--twp-accent); padding: 0.6em 1.2em; font-size: 0.92rem; }
.twp-btn-outline:hover,
.twp-btn-outline:focus-visible { background: var(--twp-accent); color: #fff; filter: none; }
.twp-img-background .twp-btn-outline { color: #fff; border-color: #fff; }

.twp-cta { margin-top: 1.75em; }

/* Triggers */
.twp-trigger-link { color: var(--twp-accent); text-decoration: underline; cursor: pointer; }
.twp-trigger-image { position: relative; display: inline-block; overflow: hidden; border-radius: 12px; line-height: 0; }
.twp-trigger-image img { display: block; max-width: 100%; height: auto; transition: transform 0.3s ease; }
.twp-trigger-image:hover img { transform: scale(1.04); }
.twp-trigger-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 12px 16px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
	color: #fff;
	font-weight: 600;
	line-height: 1.3;
}

/* Full-screen size */
.twp-size-full { padding: 0; }
.twp-size-full .twp-dialog {
	max-width: none;
	height: 100%;
	max-height: none;
	border-radius: 0;
}
.twp-size-full .twp-body { width: 100%; max-width: 1200px; margin: 0 auto; padding-top: clamp(48px, 8vh, 96px); padding-bottom: clamp(48px, 8vh, 96px); }
.twp-size-full.twp-img-top .twp-hero { aspect-ratio: auto; height: clamp(180px, 38vh, 420px); }
.twp-size-full.twp-img-left .twp-dialog,
.twp-size-full.twp-img-right .twp-dialog { height: 100%; }
.twp-size-full.twp-img-left .twp-body,
.twp-size-full.twp-img-right .twp-body { max-width: none; margin: 0; padding-top: clamp(32px, 6vh, 64px); padding-bottom: clamp(32px, 6vh, 64px); }
.twp-size-full.twp-img-left .twp-body > *,
.twp-size-full.twp-img-right .twp-body > * { width: 100%; max-width: 620px; margin-left: auto; margin-right: auto; }
.twp-size-full.twp-img-background .twp-inner { display: flex; align-items: center; min-height: 100%; }

/* ---------- Forms ---------- */
.twp-form-wrap {
	margin-top: 1.5em;
	padding: clamp(18px, 3vw, 28px);
	border: 1px solid rgba(127, 127, 127, 0.18);
	border-radius: 12px;
	background: rgba(127, 127, 127, 0.05);
	text-align: left;
}
.twp-popup .twp-form-title { margin: 0 0 0.3em; font-size: 1.2rem; line-height: 1.3; font-weight: 700; color: inherit; }
.twp-form-text { margin: 0 0 1em; font-size: 0.95rem; opacity: 0.85; }
.twp-img-background .twp-form-wrap { background: rgba(255, 255, 255, 0.95); color: #1f2937; }

/* Side-by-side: content left, form right */
.twp-form-pos-side .twp-body {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
	gap: clamp(20px, 3vw, 40px);
	align-items: start;
}
.twp-form-pos-side .twp-aside .twp-form-wrap { margin-top: 0; }
.twp-form-pos-side.twp-size-small .twp-body { display: block; }
.twp-form-pos-side.twp-size-small .twp-aside .twp-form-wrap { margin-top: 1.5em; }
.twp-form-pos-side.twp-size-medium { --twp-w: 900px; }

/* Restyled inputs (quick form + any form plugin when "match popup" is on) */
.twp-form-styled input[type="text"],
.twp-form-styled input[type="email"],
.twp-form-styled input[type="tel"],
.twp-form-styled input[type="url"],
.twp-form-styled input[type="number"],
.twp-form-styled input[type="date"],
.twp-form-styled select,
.twp-form-styled textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 14px;
	border: 1.5px solid rgba(127, 127, 127, 0.35);
	border-radius: 10px;
	background: #fff;
	color: #1f2937;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.twp-form-styled textarea { min-height: 110px; resize: vertical; }
.twp-form-styled input:focus,
.twp-form-styled select:focus,
.twp-form-styled textarea:focus {
	outline: none;
	border-color: var(--twp-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--twp-accent) 22%, transparent);
}
.twp-form-styled label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; }
.twp-form-styled input[type="submit"],
.twp-form-styled button[type="submit"],
.twp-form-styled .wpforms-submit,
.twp-form-styled .gform_button,
.twp-form-styled .ff-btn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.8em 1.8em;
	border: 0;
	border-radius: 999px;
	background: var(--twp-accent) !important;
	color: #fff !important;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease;
}
.twp-form-styled input[type="submit"]:hover,
.twp-form-styled button[type="submit"]:hover { filter: brightness(1.08); transform: translateY(-1px); }
.twp-form-styled .wpcf7-form p { margin: 0 0 14px; }
.twp-form-styled .wpcf7-not-valid-tip { margin-top: 4px; font-size: 0.85rem; }
.twp-form-styled .wpcf7 form .wpcf7-response-output { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; }
.twp-form-styled .wpcf7-spinner { margin: 0 0 0 10px; }

/* Built-in quick form */
.twp-qf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.twp-qf-field { margin: 0; }
.twp-qf-full,
.twp-qf-field:only-child { grid-column: 1 / -1; }
.twp-size-small .twp-qf-grid,
.twp-form-pos-side .twp-qf-grid { grid-template-columns: 1fr; }
.twp-req { color: var(--twp-accent); }
.twp-qf-field.has-error input,
.twp-qf-field.has-error textarea { border-color: #d63638; }
.twp-qf-error { display: block; min-height: 0; margin-top: 4px; color: #d63638; font-size: 0.82rem; }
.twp-qf-error:empty { display: none; }
.twp-qf-consent { margin-top: 14px; }
.twp-qf-consent label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.twp-qf-consent input { flex: 0 0 auto; margin-top: 4px; }
.twp-qf-consent a { color: var(--twp-accent); }
.twp-qf .twp-qf-submit { width: 100%; margin-top: 18px; min-height: 50px; font-size: 1rem; }
.twp-qf.is-sending .twp-qf-submit { opacity: 0.7; cursor: progress; }
.twp-qf-msg { margin-top: 12px; font-size: 0.95rem; }
.twp-qf-msg:empty { display: none; }
.twp-qf-msg.is-success { padding: 12px 14px; border-radius: 10px; background: #edfaef; color: #00701a; font-weight: 600; }
.twp-qf-msg.is-error { padding: 10px 14px; border-radius: 10px; background: #fcf0f1; color: #b32d2e; }
.twp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Lock page scroll while open */
html.twp-lock,
html.twp-lock body { overflow: hidden !important; }

/* Responsive */
@media (max-width: 900px) {
	.twp-cols-3 { --twp-cols: 2; }
	.twp-form-pos-side .twp-body { display: block; }
	.twp-form-pos-side .twp-aside .twp-form-wrap { margin-top: 1.5em; }
}
@media (max-width: 767px) {
	.twp-img-left .twp-dialog,
	.twp-img-right .twp-dialog { height: auto; }
	.twp-size-full.twp-img-left .twp-dialog,
	.twp-size-full.twp-img-right .twp-dialog { height: 100%; }
	.twp-img-left .twp-inner,
	.twp-img-right .twp-inner { display: block; overflow-y: auto; }
	.twp-img-left .twp-hero,
	.twp-img-right .twp-hero { height: auto; max-width: none; aspect-ratio: var(--twp-hero-ratio, 16 / 9); max-height: 45vh; }
	.twp-img-left .twp-hero img,
	.twp-img-right .twp-hero img { object-position: center; }
	.twp-img-left .twp-body,
	.twp-img-right .twp-body { display: block; overflow: visible; padding: 22px; padding-top: 22px; }
	.twp-cols-1 .twp-section { flex-direction: column; }
	.twp-cols-1 .twp-section-media { flex-basis: auto; }
}
@media (max-width: 600px) {
	.twp-popup { --twp-pad: 10px; }
	.twp-cols-2,
	.twp-cols-3 { --twp-cols: 1; }
	.twp-dialog { --twp-radius: 14px; }
	.twp-close { top: 8px; right: 8px; width: 36px; height: 36px; }
	.twp-cta .twp-btn { width: 100%; }
	.twp-qf-grid { grid-template-columns: 1fr; }
	.twp-form-styled input,
	.twp-form-styled select,
	.twp-form-styled textarea { font-size: 16px; } /* stops iOS zoom on focus */
}

@media (prefers-reduced-motion: reduce) {
	.twp-overlay,
	.twp-dialog,
	.twp-section,
	.twp-btn,
	.twp-close { transition: none !important; }
	.twp-dialog { transform: none !important; }
}
