/*
 * bizbank/conditions: key-value rows on a white card under a collapsing or
 * static heading, with an optional footnote and a link under the card.
 *
 * Values repeat the production section .conditions_section (app.css and the
 * theme's style.css) on the card, credit, contacts and securities pages.
 * Variants: --squirrel (collapsing, squirrel drawing in the card corner from
 * 992px), --plain (collapsing), --static (plain heading), --numbered
 * (collapsing, ordered lists with the numbers outside the text), --split
 * (plain heading, the rows card beside a card of cost figures, a yellow
 * footnote card and a yellow pill link; 650px is its only breakpoint).
 */

.bb-conditions {
	margin: 0 0 70px;
}

.bb-conditions.bb-conditions--space-top {
	margin-top: 20px;
}

.bb-conditions .bb-conditions__heading {
	margin: 0;
	padding: 16px 20px;
	font-size: 40px;
	font-weight: 800;
	line-height: 1.2;
	color: #000;
}

.bb-conditions .bb-conditions__title {
	display: inline;
	font: inherit;
}

.bb-conditions .bb-conditions__toggle .bb-conditions__title {
	display: inline-block;
	position: relative;
	padding-right: 101px;
	cursor: pointer;
}

.bb-conditions .bb-conditions__toggle .bb-conditions__title::after {
	content: "";
	display: block;
	position: absolute;
	top: 7px;
	right: 0;
	width: 32px;
	height: 32px;
	background: url(../assets/img/conditions-arrow.svg) center center no-repeat;
	transition: all 0.3s ease;
}

.bb-conditions .bb-conditions__toggle.is-open .bb-conditions__title::after {
	transform: rotate(-180deg);
}

.bb-conditions .bb-conditions__card {
	position: relative;
	margin: 0;
	padding: 30px 20px;
	border-radius: 20px;
	background: #fff;
}

.bb-conditions--squirrel .bb-conditions__card::after {
	content: "";
	display: none;
	position: absolute;
	right: 40px;
	bottom: 40px;
	z-index: 1;
	width: 482px;
	height: 460px;
	background: url(../assets/img/conditions-squirrel.svg) center center / contain no-repeat;
	pointer-events: none;
}

.bb-conditions .bb-conditions__row {
	display: block;
	position: relative;
	z-index: 2;
	max-width: none;
	margin: 0;
	padding: 30px 0;
}

.bb-conditions .bb-conditions__row:not(:first-child) {
	border-top: 1px solid #b3b3b3;
}

.bb-conditions .bb-conditions__key {
	margin: 0;
	padding: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.5;
	color: #000;
}

.bb-conditions--numbered .bb-conditions__key {
	max-width: 520px;
}

.bb-conditions .bb-conditions__value {
	margin: 0;
	padding: 0;
	font-size: 24px;
	font-weight: 300;
	line-height: 1.5;
	color: #000;
}

.bb-conditions .bb-conditions__value p {
	margin: 0;
	padding: 16px 0;
	font: inherit;
}

.bb-conditions .bb-conditions__value > p:first-child {
	padding-top: 0;
}

.bb-conditions .bb-conditions__value > p:last-child {
	padding-bottom: 0;
}

.bb-conditions .bb-conditions__value a {
	display: inline-block;
	color: #3e66f4;
	text-decoration: underline;
	transition: 0.3s;
}

.bb-conditions .bb-conditions__value :is(ul, ol) {
	margin: 0;
	padding: 0;
	font: inherit;
}

.bb-conditions .bb-conditions__value ul {
	list-style: none;
}

.bb-conditions .bb-conditions__value li {
	margin: 0;
	padding: 0;
	font: inherit;
}

.bb-conditions .bb-conditions__value ul > li {
	position: relative;
	margin-top: 10px;
	padding-left: 25px;
}

.bb-conditions .bb-conditions__value ul > li:not(:last-child) {
	padding-bottom: 26px;
}

.bb-conditions .bb-conditions__value ul > li::before {
	content: "";
	display: block;
	position: absolute;
	top: 14px;
	left: 0;
	width: 9px;
	height: 9px;
	border-radius: 100%;
	background: #000;
}

.bb-conditions .bb-conditions__value ol {
	list-style: decimal;
	list-style-position: inside;
}

.bb-conditions--numbered .bb-conditions__value ol {
	list-style-position: outside;
	padding-left: 25px;
}

.bb-conditions--numbered .bb-conditions__value ol > li:not(:last-child) {
	padding-bottom: 36px;
}

.bb-conditions .bb-conditions__footnote {
	padding: 19px 20px 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #000;
}

.bb-conditions .bb-conditions__footnote p {
	margin: 0;
	padding: 8px 0;
	font: inherit;
}

.bb-conditions .bb-conditions__footnote a {
	display: inline-block;
	color: #3e66f4;
	text-decoration: underline;
	text-decoration-color: #3e66f4;
	transition: 0.3s;
}

.bb-conditions .bb-conditions__more {
	max-width: 290px;
	margin: 16px auto;
	text-align: center;
}

/*
 * Line under the link, such as the date the conditions are valid on: grey
 * 14px text centred under the link (.si-date of the BISeshka mockup).
 */
.bb-conditions .bb-conditions__note {
	margin: 14px 0 0;
	padding: 0;
	color: #6b7680;
	font-family: Mulish, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 21px;
	text-align: center;
}

.bb-conditions .bb-conditions__link {
	display: inline-block;
	margin: 0;
	padding: 14px 60px 13px;
	border: 0;
	border-radius: 100px;
	background: none;
	color: #000;
	font-family: Mulish, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	text-align: center;
	text-decoration: underline;
	text-decoration-style: solid;
	cursor: pointer;
	transition: all 0.2s ease;
}

/*
 * In the editor canvas the rows and their paragraphs and lists are blocks;
 * the classic editor styles would cap them at 840px with 28px margins
 * (wp-includes/css/dist/edit-post/classic.css).
 */
.editor-styles-wrapper .bb-conditions .bb-conditions__row,
.editor-styles-wrapper .bb-conditions .bb-conditions__value > .wp-block {
	max-width: none;
	margin-top: 0;
	margin-bottom: 0;
	margin-left: 0;
	margin-right: 0;
}

/*
 * In the editor the footnote is one RichText and its paragraphs are line
 * breaks; a break is given the gap two footnote paragraphs have (8px + 8px).
 * Chromium ignores box properties on <br>, so there the break shows without
 * the gap; the front is unaffected.
 */
.editor-styles-wrapper .bb-conditions .bb-conditions__footnote br {
	display: block;
	content: "";
	margin-top: 16px;
}

@media screen and (min-width: 576px) {

	.bb-conditions .bb-conditions__more {
		max-width: 330px;
	}
}

@media screen and (min-width: 992px) {

	.bb-conditions .bb-conditions__heading + .bb-conditions__card,
	.bb-conditions .bb-conditions__collapse .bb-conditions__card {
		margin-top: 14px;
	}

	.bb-conditions--squirrel .bb-conditions__card::after {
		display: block;
	}

	.bb-conditions .bb-conditions__row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px 30px;
		align-items: start;
	}
}

@media screen and (max-width: 991px) {

	.bb-conditions {
		margin-bottom: 24px;
	}

	.bb-conditions .bb-conditions__heading {
		padding: 16px 0 23px;
		font-size: 28px;
	}

	.bb-conditions .bb-conditions__toggle .bb-conditions__title {
		display: block;
		padding-right: 40px;
	}

	.bb-conditions .bb-conditions__toggle .bb-conditions__title::after {
		width: 21px;
		height: 21px;
		background-size: contain;
	}

	.bb-conditions .bb-conditions__card > .bb-conditions__row:first-child {
		padding-top: 2px;
	}

	.bb-conditions .bb-conditions__card > .bb-conditions__row:last-child {
		padding-bottom: 2px;
	}

	.bb-conditions .bb-conditions__key {
		margin-bottom: 16px;
		font-size: 20px;
	}

	.bb-conditions .bb-conditions__value {
		font-size: 20px;
		overflow-wrap: break-word;
	}

	.bb-conditions .bb-conditions__value ul > li:not(:last-child) {
		padding-bottom: 19px;
	}

	.bb-conditions .bb-conditions__footnote {
		padding: 23px 0 0;
		font-size: 14px;
	}

	.bb-conditions .bb-conditions__link {
		display: block;
		padding: 11px 30px 10px;
	}
}

/*
 * Variant --split ("Умови та вартість" of the factoring page). Every
 * selector carries the variant class and at least one more class, so the
 * rules also beat the base rules inside the 991px query and hold in the
 * editor canvas. The section margin is bottom only, which leaves the
 * "Відступ зверху" switch working.
 */
.bb.bb-conditions.bb-conditions--split {
	margin-bottom: 64px;
	scroll-margin-top: 30px;
	overflow-wrap: break-word;
	font-size: 18px;
	line-height: 1.5;
}

.bb-conditions.bb-conditions--split .bb-conditions__heading {
	margin: 0 0 24px;
	padding: 0;
	font-size: 34px;
	font-weight: 800;
	line-height: 1.25;
}

.bb-conditions--split .bb-conditions__split {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 16px;
}

.bb-conditions--split .bb-conditions__split--solo {
	grid-template-columns: minmax(0, 1fr);
}

.bb-conditions.bb-conditions--split .bb-conditions__card,
.bb-conditions--split .bb-conditions__costs {
	margin: 0;
	padding: 28px;
	border-radius: 22px;
	background: #fff;
}

.bb-conditions.bb-conditions--split .bb-conditions__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
	align-items: normal;
	padding: 18px 0;
}

.bb-conditions.bb-conditions--split .bb-conditions__row:not(:first-child) {
	border-top: 0;
}

.bb-conditions.bb-conditions--split .bb-conditions__row:not(:last-child) {
	border-bottom: 1px solid var(--bb-body);
}

.bb-conditions.bb-conditions--split .bb-conditions__card > .bb-conditions__row:first-child {
	padding-top: 18px;
}

.bb-conditions.bb-conditions--split .bb-conditions__card > .bb-conditions__row:last-child {
	padding-bottom: 18px;
}

.bb-conditions.bb-conditions--split .bb-conditions__key {
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #52595d;
}

.bb-conditions.bb-conditions--split .bb-conditions__value {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
}

.bb-conditions--split .bb-conditions__costs {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	gap: 18px;
}

.bb-conditions--split .bb-conditions__cost-value {
	margin: 0 0 12px;
	padding: 0;
	font-size: 27px;
	font-weight: 800;
	line-height: 1.35;
	color: #000;
}

.bb-conditions--split .bb-conditions__cost-caption {
	margin: 0 0 20px;
	padding: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #000;
}

.bb-conditions.bb-conditions--split .bb-conditions__footnote {
	margin-top: 16px;
	padding: 28px;
	border-radius: 22px;
	background: #fff6bd;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;
}

.bb-conditions--split .bb-conditions__footnote-title {
	margin: 0 0 12px;
	padding: 0;
	font-size: 23px;
	font-weight: 800;
	line-height: 1.35;
	color: #000;
}

.bb-conditions.bb-conditions--split .bb-conditions__footnote p {
	margin: 0 0 20px;
	padding: 0;
}

.bb-conditions.bb-conditions--split .bb-conditions__more {
	max-width: none;
	margin: 32px 0 0;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.bb-conditions.bb-conditions--split .bb-conditions__note {
	text-align: left;
}

.bb-conditions.bb-conditions--split .bb-conditions__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 28px;
	background: var(--bb-yellow-strong);
	color: #000;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
}

.bb-conditions.bb-conditions--split .bb-conditions__link:hover,
.bb-conditions.bb-conditions--split .bb-conditions__link:focus-visible {
	background: #efc300;
}

/* The theme removes the outline of focused links; the ring restores it. */
.bb-conditions.bb-conditions--split .bb-conditions__link:focus-visible {
	outline: 2px solid var(--bb-blue);
	outline-offset: 2px;
}

.editor-styles-wrapper .bb-conditions--split .bb-conditions__footnote br {
	margin-top: 20px;
}

.editor-styles-wrapper .bb-conditions--split .bb-conditions__add {
	margin-top: 16px;
}

@media screen and (max-width: 650px) {

	.bb.bb-conditions.bb-conditions--split {
		margin-bottom: 48px;
		font-size: 16px;
		line-height: 24px;
	}

	.bb-conditions.bb-conditions--split .bb-conditions__heading {
		font-size: 27px;
	}

	.bb-conditions--split .bb-conditions__split {
		grid-template-columns: minmax(0, 1fr);
	}

	.bb-conditions.bb-conditions--split .bb-conditions__card,
	.bb-conditions--split .bb-conditions__costs,
	.bb-conditions.bb-conditions--split .bb-conditions__footnote {
		padding: 24px;
		border-radius: 18px;
	}

	.bb-conditions.bb-conditions--split .bb-conditions__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 7px;
	}

	.bb-conditions.bb-conditions--split .bb-conditions__footnote {
		font-size: 16px;
	}

	.bb-conditions--split .bb-conditions__footnote-title {
		font-size: 22px;
	}

	.bb-conditions.bb-conditions--split .bb-conditions__link {
		display: flex;
		width: 100%;
	}
}
