/* Styles of the signup pages (account.laposta.nl), loaded after bootstrap.css by
   template/base.template.php. Plain CSS without a build step: until 2026-11-13 this was
   _styles.scss in a Sass build, see the git history. Colours are the ones bootstrap.css has
   (primary #e42219, text #212529, borders #dee2e6).

   Breakpoints are Bootstrap's: below xl = max-width 1199.98px, xl and up = min-width 1200px,
   below md = max-width 767.98px. Rule order matters (later rules win), so add new rules next
   to the ones they change. */

/* Body font: ABC Diatype, self-hosted, same faces as the app (app base.css).
   Private family name, so @font-face rules an embedded widget injects for
   "ABC Diatype" cannot replace it. Diatype's own em box (97% up, 36% down)
   puts the capitals about 1px high in buttons and fields; the ascent and
   descent overrides keep the total height (133%) with the caps (70%) centred.
   The headings' Fira Sans is in fira-sans.css. */
@font-face {
	font-family: "LP UI Diatype";
	src: url("../fonts/diatype/ABCDiatype-Regular.woff2") format("woff2"), url("../fonts/diatype/ABCDiatype-Regular.woff") format("woff");
	font-weight: 400;
	ascent-override: 101.5%;
	descent-override: 31.5%;
	font-style: normal;
}

@font-face {
	font-family: "LP UI Diatype";
	src: url("../fonts/diatype/ABCDiatype-RegularItalic.woff2") format("woff2"), url("../fonts/diatype/ABCDiatype-RegularItalic.woff") format("woff");
	font-weight: 400;
	ascent-override: 101.5%;
	descent-override: 31.5%;
	font-style: italic;
}

@font-face {
	font-family: "LP UI Diatype";
	src: url("../fonts/diatype/ABCDiatype-Medium.woff2") format("woff2"), url("../fonts/diatype/ABCDiatype-Medium.woff") format("woff");
	font-weight: 500;
	ascent-override: 101.5%;
	descent-override: 31.5%;
	font-style: normal;
}

@font-face {
	font-family: "LP UI Diatype";
	src: url("../fonts/diatype/ABCDiatype-Bold.woff2") format("woff2"), url("../fonts/diatype/ABCDiatype-Bold.woff") format("woff");
	font-weight: 700;
	ascent-override: 101.5%;
	descent-override: 31.5%;
	font-style: normal;
}

@font-face {
	font-family: "LP UI Diatype";
	src: url("../fonts/diatype/ABCDiatype-BoldItalic.woff2") format("woff2"), url("../fonts/diatype/ABCDiatype-BoldItalic.woff") format("woff");
	font-weight: 700;
	ascent-override: 101.5%;
	descent-override: 31.5%;
	font-style: italic;
}

/* The icon font of fonts/bootstrap/bootstrap-icons.min.css, which declares no @font-face itself. */
@font-face {
	font-family: "bootstrap-icons";
	src: url("../fonts/bootstrap/bootstrap-icons.woff2") format("woff2"), url("../fonts/bootstrap/bootstrap-icons.woff") format("woff");
	font-display: block;
	font-weight: normal;
	font-style: normal;
}

body {
	font-variant-ligatures: none;
}

/* The envelope on the done page (.email-alert) shakes, its "1" badge pulses */
@keyframes alert-shake {
	0%, 100% {
		transform: rotate(0deg);
	}
	2% {
		transform: rotate(-12deg);
	}
	4% {
		transform: rotate(10deg);
	}
	8% {
		transform: rotate(-8deg);
	}
	10% {
		transform: rotate(6deg);
	}
	12% {
		transform: rotate(-4deg);
	}
	14% {
		transform: rotate(0deg);
	}
}

@keyframes alert-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(228, 34, 25, 0.5);
	}
	100% {
		box-shadow: 0 0 0 0.6rem rgba(228, 34, 25, 0);
	}
}

/* Page layout: #main holds the form column and the info column; below xl the page gets
   the hero background and the form a white card */
#main {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	position: relative;
}

@media (max-width: 1199.98px) {
	#main {
		background: linear-gradient(to bottom, #f7f7f3 70%, rgba(247, 247, 243, 0.55) 100%);
	}

	#main::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 0;
		background-image: url("../img/hero-bg.png");
		background-size: cover;
		background-position: center center;
		background-repeat: no-repeat;
		pointer-events: none;
		opacity: 0.3;
	}
}

#main .px-xxl-5:has(.form-wrapper) {
	width: 100%;
}

@media (max-width: 1199.98px) {
	#main .px-xxl-5:has(.form-wrapper) .form-wrapper {
		margin-inline: auto;
	}
}

/* Form column */
#main .form-wrapper {
	max-width: 35rem;
}

@media (max-width: 1199.98px) {
	#main .form-wrapper {
		border: 1px solid #dee2e6;
		padding: 3rem;
		background-color: #fff;
		border-radius: 2rem;
		corner-shape: superellipse(1.5);
	}
}

@media (max-width: 767.98px) {
	#main .form-wrapper {
		padding: 1.5rem;
	}
}

/* Password strength result under the password field (js/check_password.js) */
#main .form-wrapper #passwordcheck .result {
	margin-top: -0.5rem;
	padding: 1rem 0.75rem 0.5rem 0.75rem;
	color: #212529;
	background-color: #ffffff;
	font-size: 0.875rem;
	display: none;
	border: 1px solid #dee2e6;
	border-top: 0;
	border-radius: 0.5rem;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

#main .form-wrapper #passwordcheck .result i {
	flex-shrink: 0;
}

/* Show/hide eye inside the password field */
#main .form-wrapper .password-container {
	position: relative;
}

#main .form-wrapper .password-container .toggle-password {
	position: absolute;
	top: 50%;
	right: 1rem;
	transform: translateY(-50%);
	cursor: pointer;
}

/* The "Inloggen" button: top right of the form column from xl up */
#main .form-wrapper .login-wrapper {
	position: relative;
}

@media (max-width: 1199.98px) {
	#main .form-wrapper .login-wrapper .btn {
		border: 0;
	}
}

@media (min-width: 1200px) {
	#main .form-wrapper .login-wrapper {
		position: absolute;
		top: 0;
		right: 0;
	}
}

#main .form-wrapper .err {
	color: #e42219;
}

/* The envelope with a "1" badge on the done page */
#main .form-wrapper .email-alert .alert {
	position: relative;
	overflow: visible;
	animation: alert-shake 5s ease-in-out 1s infinite;
	transform-origin: center center;
}

#main .form-wrapper .email-alert .alert::before {
	content: "1";
	position: absolute;
	top: -0.5rem;
	right: -0.5rem;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background-color: #e42219;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: alert-pulse 2s ease-out infinite;
}

/* Info column: the carousel and the cards */
#main .info-wrapper {
	padding: 0;
}

/* Fading carousel: the outgoing slide fades out first, then the incoming one fades in */
#main .info-wrapper .carousel.carousel-fade {
	--carousel-fade-out: 0.4s;
	--carousel-fade-in: 0.6s;
	--carousel-fade-total: calc(var(--carousel-fade-out) + var(--carousel-fade-in));
}

#main .info-wrapper .carousel.carousel-fade .carousel-inner {
	position: relative;
	min-height: calc(400px + 3rem + 2.5rem + 1.5rem);
}

#main .info-wrapper .carousel.carousel-fade .carousel-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	float: none;
	margin-right: 0;
	opacity: 0;
	transition-property: opacity;
	transition-duration: var(--carousel-fade-total);
	transform: none;
}

#main .info-wrapper .carousel.carousel-fade .carousel-item.active:not(.carousel-item-start):not(.carousel-item-end) {
	z-index: 1;
	opacity: 1;
}

/* Incoming: wait for fade-out, then fade in */
#main .info-wrapper .carousel.carousel-fade .carousel-item-next.carousel-item-start,
#main .info-wrapper .carousel.carousel-fade .carousel-item-prev.carousel-item-end {
	z-index: 1;
	opacity: 1;
	transition: opacity var(--carousel-fade-in) ease-in var(--carousel-fade-out);
}

/* Outgoing: quick visual fade-out; transition delay keeps Bootstrap waiting for fade-in */
#main .info-wrapper .carousel.carousel-fade .active.carousel-item-start,
#main .info-wrapper .carousel.carousel-fade .active.carousel-item-end {
	z-index: 0;
	opacity: 1;
	animation: info-carousel-fade-out var(--carousel-fade-out) ease-out forwards;
	transition: opacity 0s linear var(--carousel-fade-total);
}

@keyframes info-carousel-fade-out {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

#main .info-wrapper .carousel {
	background: linear-gradient(to bottom, #f7f7f3 70%, rgba(247, 247, 243, 0.55) 100%);
	border-radius: 3rem;
	corner-shape: superellipse(1.5);
	overflow: hidden;
}

#main .info-wrapper .carousel img {
	height: 400px;
	max-height: 400px;
	width: 100%;
	-o-object-fit: contain;
	object-fit: contain;
	margin: 0 auto;
	display: block;
}

#main .info-wrapper .card-wrapper {
	padding-top: 1.5rem;
	display: flex;
}

#main .info-wrapper .card-wrapper .card {
	flex: 1;
	corner-shape: superellipse(1.5);
	border-width: 1px;
	--bs-card-spacer-y: 1.5rem;
	--bs-card-spacer-x: 1.5rem;
	--bs-card-border-color: #dee2e6;
	--bs-card-border-radius: 2rem;
	--bs-card-bg: var(--bs-body-bg);
}

#main .info-wrapper .card-wrapper .card .card-text {
	font-size: 0.875rem;
}

/* Buttons and links on every page */
#main .btn {
	corner-shape: superellipse(1.5);
}

#main a:not(.btn) {
	color: #212529;
}

#main a:not(.btn):hover {
	color: #e42219;
}

#main .lead a {
	font-weight: 700;
}

#main .form-text a,
#main .av a {
	text-decoration: none;
	font-weight: 600;
}

/* Text links in the form column are underlined so they read as links,
   same underline as the app (ui/typography.css) */
#main .form-wrapper a:not(.btn) {
	text-decoration: underline;
	text-decoration-color: #959087;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
	-webkit-text-decoration-skip-ink: none;
	text-decoration-skip-ink: none;
}

#main .form-wrapper a:not(.btn):hover {
	text-decoration-color: currentColor;
}

/* Gold text with a moving shine */
@keyframes gold-glow {
	0% {
		background-position: 0% 0%;
	}
	20% {
		background-position: 100% 100%;
	}
	100% {
		background-position: 100% 100%;
	}
}

#main .text-gold {
	display: inline-block;
	background: linear-gradient(135deg, #d0aa3a 0%, #dbb842 22%, #e8cf72 38%, #f2e090 50%, #e8cf72 62%, #dbb842 78%, #d0aa3a 100%);
	background-size: 250% 250%;
	background-position: 0% 0%;
	animation: gold-glow 3s ease-in-out infinite;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: #dbb842;
}

@media (prefers-reduced-motion: reduce) {
	#main .text-gold {
		animation: none;
		background-position: 35% 35%;
	}
}

/* Confetti on the done page (pieces made by the script in template/done.template.php) */
#main .confetti {
	position: fixed;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 10;
	perspective: 600px;
}

#main .confetti .confetti-piece {
	position: absolute;
	pointer-events: none;
	top: -15px;
	opacity: 0;
	will-change: transform;
	transform-style: preserve-3d;
}

#main .confetti .confetti-inner {
	display: block;
	will-change: transform;
}

@keyframes confetti-fall {
	0% {
		transform: translateY(0);
		opacity: 1;
	}
	90% {
		opacity: 1;
	}
	100% {
		transform: translateY(var(--confetti-drop, 850px));
		opacity: 0;
	}
}

@keyframes confetti-spin {
	0% {
		transform: rotateY(0deg) rotateX(0deg);
	}
	100% {
		transform: rotateY(360deg) rotateX(180deg);
	}
}

@keyframes confetti-sway-a {
	0% {
		margin-left: 0;
	}
	50% {
		margin-left: 30px;
	}
	100% {
		margin-left: 0;
	}
}

@keyframes confetti-sway-b {
	0% {
		margin-left: 0;
	}
	50% {
		margin-left: -30px;
	}
	100% {
		margin-left: 0;
	}
}

/* Select2 (the time zone field) in the look of the Bootstrap form fields */
.select2-container .select2-selection.select2-selection--single {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--bs-body-color);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-color: var(--bs-body-bg);
	background-clip: padding-box;
	border: var(--bs-border-width) solid #dee2e6;
	border-radius: 0.5rem;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
	height: auto;
}

.select2-container .select2-selection.select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: 0.75rem;
	transform: translateY(-50%);
}

.select2-container.select2-container--default .select2-search--dropdown {
	padding: 0;
	position: relative;
}

/* Search icon in the dropdown's search field */
.select2-container.select2-container--default .select2-search--dropdown::before {
	content: "\f52a";
	font-family: "bootstrap-icons";
	position: absolute;
	top: 50%;
	left: 0.75rem;
	transform: translateY(-50%);
	pointer-events: none;
	color: #212529;
	opacity: 0.7;
}

.select2-container.select2-container--default .select2-search--dropdown .select2-search__field {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem 0.5rem 2.25rem;
	border: none;
	border-bottom: var(--bs-border-width) solid #dee2e6;
}

.select2-container.select2-container--default .select2-search--dropdown .select2-search__field:focus-visible {
	border-color: #dee2e6;
	outline: 0;
}

.select2-container.select2-container--default .select2-dropdown {
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	overflow: hidden;
	margin-top: 0.25rem;
}

.select2-container.select2-container--default .select2-dropdown .select2-results__option {
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	font-weight: 400;
}

.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
	border-bottom-left-radius: 0.5rem;
	border-bottom-right-radius: 0.5rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: #fff;
	color: #e42219;
}

.select2-container--default .select2-results__option[aria-selected=true] {
	background-color: #ffffff;
	color: #212529;
}
