/**
 * VIP list box — standard card in the offer results list.
 *
 * @package StaniszewskaFinanse
 */

.sf-vip {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	grid-column: auto;
	container-type: inline-size;
	margin-bottom: 0;
	padding: clamp(14px, 2.4vw, 24px);
	border: 1px solid rgb(255 255 255 / 14%);
	background: #1b0f17;
	box-shadow:
		0 20px 46px -26px rgb(108 62 120 / 42%),
		0 8px 22px -16px rgb(255 45 123 / 18%);
	transition: max-height 0.65s ease, opacity 0.5s ease, margin 0.5s ease, padding 0.5s ease;
}

/* Animated, heavily blurred colour blobs in the brand palette. */
.sf-vip::before {
	position: absolute;
	z-index: 0;
	inset: -25%;
	background:
		linear-gradient(rgb(22 9 16 / 38%), rgb(22 9 16 / 38%)),
		radial-gradient(60% 70% at 18% 22%, #1e73be 0%, transparent 62%),
		radial-gradient(58% 66% at 82% 28%, #ff2d7b 0%, transparent 60%),
		radial-gradient(62% 70% at 70% 84%, #e5b76e 0%, transparent 62%),
		radial-gradient(70% 70% at 30% 78%, #1e73be 0%, transparent 66%),
		linear-gradient(120deg, #241426 0%, #1b0f17 100%);
	background-size: auto, 200% 200%, 200% 200%, 200% 200%, 200% 200%, auto;
	animation: sf-vip-gradient 13s ease-in-out infinite;
	content: "";
	filter: blur(30px) saturate(125%);
	pointer-events: none;
}

@keyframes sf-vip-gradient {
	0% { background-position: 0% 50%, 6% 18%, 84% 26%, 68% 82%, 28% 76%, 0% 50%; }
	13% { background-position: 0% 50%, 22% 34%, 72% 20%, 58% 88%, 40% 62%, 0% 50%; }
	27% { background-position: 0% 50%, 40% 58%, 60% 44%, 46% 70%, 54% 40%, 0% 50%; }
	41% { background-position: 0% 50%, 64% 74%, 38% 62%, 70% 52%, 30% 58%, 0% 50%; }
	58% { background-position: 0% 50%, 78% 54%, 22% 40%, 84% 34%, 18% 44%, 0% 50%; }
	73% { background-position: 0% 50%, 58% 30%, 42% 26%, 66% 22%, 34% 28%, 0% 50%; }
	88% { background-position: 0% 50%, 26% 20%, 70% 18%, 52% 34%, 46% 22%, 0% 50%; }
	100% { background-position: 0% 50%, 6% 18%, 84% 26%, 68% 82%, 28% 76%, 0% 50%; }
}

.sf-vip__panel {
	position: relative;
	z-index: 1;
	padding: clamp(20px, 3vw, 32px);
	border: 1px solid var(--sf-line-soft);
	background: var(--sf-white);
	box-shadow: 0 10px 26px -20px rgb(20 10 25 / 32%);
}

.sf-vip__eyebrow {
	margin: 0 0 10px;
	color: var(--sf-blue);
	font-size: var(--sf-type-caption);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sf-vip h2 {
	max-width: 30ch;
	margin: 0;
	color: var(--sf-ink);
	font-family: var(--sf-font-display);
	font-size: clamp(1.4rem, 2.2vw, 1.9rem);
	font-weight: 400;
	line-height: 1.22;
}

.sf-vip__lead {
	max-width: 64ch;
	margin: var(--sf-space-3) 0 var(--sf-space-5);
	color: var(--sf-muted);
	font-size: var(--sf-type-small);
	line-height: var(--sf-leading-reading);
}

.sf-vip__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sf-vip__fields {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--sf-space-3);
}

.sf-vip__field {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 6px;
}

.sf-vip__field input,
.sf-vip__field select {
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid var(--sf-line-soft);
	border-radius: 0;
	background: var(--sf-white);
	color: var(--sf-ink);
	font-size: var(--sf-type-small);
}

.sf-vip__field select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--sf-ink) 50%), linear-gradient(135deg, var(--sf-ink) 50%, transparent 50%);
	background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	padding-right: 34px;
}

.sf-vip__field input:focus,
.sf-vip__field select:focus {
	border-color: var(--sf-blue);
	outline: none;
	box-shadow: 0 0 0 3px rgb(30 115 190 / 14%);
}

.sf-vip__consent {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: var(--sf-space-3) 0 var(--sf-space-4);
	color: var(--sf-muted);
	font-size: 0.6875rem;
	line-height: 1.45;
}

.sf-vip__consent input {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	accent-color: var(--sf-blue);
}

.sf-vip__consent a {
	color: var(--sf-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sf-vip__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.sf-vip__status {
	margin: 0;
	color: var(--sf-muted);
	font-size: var(--sf-type-caption);
	line-height: 1.5;
}

.sf-vip__status.is-success {
	color: #0a6b2d;
}

.sf-vip__status.is-error {
	color: #a52d3b;
}

/* Success state: big confirmation, then the card collapses and disappears. */
.sf-vip.is-success .sf-vip__form {
	display: none;
}

.sf-vip__done {
	padding: clamp(6px, 1vw, 10px) 0;
}

.sf-vip__done-eyebrow {
	margin: 0 0 10px;
	color: var(--sf-blue);
	font-size: var(--sf-type-caption);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sf-vip__done-text {
	max-width: 30ch;
	margin: 0;
	color: var(--sf-ink);
	font-family: var(--sf-font-display);
	font-size: clamp(1.3rem, 2vw, 1.75rem);
	line-height: 1.3;
}

.sf-vip.is-collapsing {
	overflow: hidden;
	opacity: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
}

@container (max-width: 620px) {
	.sf-vip__fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.sf-vip__actions {
		align-items: stretch;
	}

	.sf-vip__actions .sf-button {
		width: 100%;
		justify-content: center;
	}

	.sf-vip__status {
		text-align: center;
	}
}

@media (max-width: 900px) {
	.sf-vip__fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.sf-vip__actions {
		align-items: stretch;
	}

	.sf-vip__actions .sf-button {
		width: 100%;
		justify-content: center;
	}

	.sf-vip__status {
		text-align: center;
	}
}

@media (max-width: 780px) {
	.sf-vip__field input,
	.sf-vip__field select {
		font-size: 16px;
	}
}
