/* Styles of the login portal (login.laposta.nl, and the white-label login through its symlinked
   assets), loaded after bootstrap.css by login-base.tpl.php. Plain CSS without a build step: until
   2026-11-05 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 lg = max-width 991.98px, 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 (Laposta hosts only). */
@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;
}

/* Page layout: #main holds the info column (left of the form from xl up, under it below xl)
   and the form column. Below xl the page gets the hero background. */
#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 {
		align-items: center;
	}
}

/* Form column */
#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;
	}
}

#main .form-wrapper {
	max-width: 35rem;
}

#main .form-wrapper h1,
#main .form-wrapper .h1 {
	text-wrap: balance;
}

@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 new password field */
#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;
}

#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;
}

#main .form-wrapper .lang-selector-wrapper {
	position: relative;
}

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

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

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

/* A line with a word in the middle ("Of") */
#main .form-wrapper .separator {
	display: flex;
	align-items: center;
	text-align: center;
	color: #ced4da;
	font-size: 0.875rem;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

#main .form-wrapper .separator::before,
#main .form-wrapper .separator::after {
	content: "";
	flex: 1;
	border-bottom: 1px solid #dee2e6;
}

#main .form-wrapper .separator:not(:empty)::before {
	margin-right: 1rem;
}

#main .form-wrapper .separator:not(:empty)::after {
	margin-left: 1rem;
}

/* Single sign-on provider tiles */
#main .form-wrapper .sso-login {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

#main .form-wrapper .sso-login .btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 1.5rem;
	gap: 1rem;
	border: var(--bs-border-width) var(--bs-border-style) #dee2e6;
	border-radius: 2rem;
	corner-shape: superellipse(1.5);
	flex: 1 1 0;
	aspect-ratio: 5/4;
	max-width: 225px;
	max-height: 180px;
}

#main .form-wrapper .sso-login .btn img {
	height: 2rem;
}

@media (max-width: 767.98px) {
	#main .form-wrapper .sso-login .btn {
		flex: 1 1 100%;
		aspect-ratio: auto;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
	#main .form-wrapper .sso-login .btn img {
		order: 1;
	}
}

#main .form-wrapper .sso-login .btn:hover,
#main .form-wrapper .sso-login .btn:focus,
#main .form-wrapper .sso-login .btn:active {
	background-color: #fff;
	border-color: #e42219;
	color: #e42219;
}

#main .form-wrapper .sso-links {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

#main .form-wrapper .sso-links .sso-link {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

#main .form-wrapper .sso-links .sso-link .user-select-all {
	padding: 0.5rem 0.75rem;
	background-color: rgba(241, 238, 233, 0.35);
	border-radius: 0.5rem;
}

/* One box per digit of a 2FA code (js/otp-inputs.js) */
#main .form-wrapper .otp-inputs {
	display: flex;
	gap: 0.75rem;
}

@media (max-width: 991.98px) {
	#main .form-wrapper .otp-inputs {
		gap: 0.5rem;
	}
}

#main .form-wrapper .otp-inputs .otp-digit {
	flex: 1 1 100%;
	font-size: 1.25rem;
	aspect-ratio: 7/8;
	min-height: 2.5rem;
	height: auto;
	max-width: 3rem;
	font-weight: 700;
	text-align: center;
	padding: 0;
	border-radius: 0.75rem;
	corner-shape: superellipse(1.5);
	border-color: #c1c9d0; /* the border colour #dee2e6, 10% darker */
}

#main .form-wrapper .otp-inputs .otp-digit.is-invalid {
	background-image: none;
	padding-right: 0;
	color: #e42219;
}

#main .form-wrapper .accordion {
	--bs-accordion-border-radius: 1rem;
	border-radius: 1rem;
	corner-shape: superellipse(1.5);
	--bs-accordion-inner-border-radius: calc(var(--bs-accordion-border-radius) - (var(--bs-border-width)));
	--bs-accordion-btn-focus-box-shadow: none;
	--bs-accordion-body-padding-x: 1.25rem;
	--bs-accordion-body-padding-y: 1rem;
	--bs-accordion-active-color: var(--bs-body-color);
	--bs-accordion-active-bg: transparent;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

#main .form-wrapper .accordion .accordion-item {
	background-color: transparent;
	border-radius: var(--bs-accordion-inner-border-radius);
}

#main .form-wrapper .accordion .accordion-item:not(:first-of-type) {
	border-top: 1px solid #dee2e6;
}

#main .form-wrapper .accordion .accordion-item .accordion-button {
	border-radius: var(--bs-accordion-inner-border-radius);
	box-shadow: none;
	font-size: 1.25rem;
	font-weight: 700;
}

#main .form-wrapper .accordion .accordion-item .accordion-body {
	padding-top: 0;
}

/* Info column (inc/info-column.inc.php): the carousel and the help cards */
#main .info-wrapper {
	padding: 0;
	position: relative;
	border-radius: 3rem;
	corner-shape: superellipse(1.5);
	background-color: #f7f7f3;
	overflow: hidden;
}

#main .info-wrapper > * {
	position: relative;
	z-index: 1;
}

#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;
}

#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);
}

#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 img {
	height: 400px;
	max-height: 400px;
	width: 100%;
	object-fit: contain;
	margin: 0 auto;
	display: block;
}

#main .info-wrapper .carousel .carousel-control-prev,
#main .info-wrapper .carousel .carousel-control-next {
	width: 50%;
}

#main .info-wrapper .carousel .carousel-indicators {
	margin-right: 0;
	margin-left: 0;
}

@media (max-width: 1199.98px) {
	#main .info-wrapper {
		border-radius: 0;
		background-color: transparent;
	}
}

#main .info-wrapper .card-wrapper {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

@media (min-width: 1200px) {
	#main .info-wrapper .card-wrapper {
		padding: 0 3rem 3rem;
	}
}

@media (max-width: 1199.98px) {
	#main .info-wrapper .card-wrapper {
		grid-template-columns: repeat(1, 1fr);
		gap: 1rem;
		margin-top: 2rem;
		width: 100%;
		max-width: 35rem;
		margin-left: auto;
		margin-right: auto;
	}
}

#main .info-wrapper .card-wrapper .card {
	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);
}

@media (max-width: 1199.98px) {
	#main .info-wrapper .card-wrapper .card {
		--bs-card-spacer-y: 0;
		--bs-card-spacer-x: 0;
		--bs-card-border-radius: 0;
		border-width: 0;
		background-color: transparent;
	}
}

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

#main .info-wrapper .card-wrapper .card a {
	color: #212529;
	font-weight: 600;
}

#main .info-wrapper .card-wrapper .card a:hover {
	color: #e42219;
}

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

#main a:not(.btn) {
	text-decoration: none;
	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;
	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%;
	}
}

#main .alternative-login {
	border: 1px solid #dee2e6;
}

@media (max-width: 1199.98px) {
	#main .alternative-login {
		border-width: 0;
		background-color: transparent;
	}
}
