/**
 * BMA Material Gate — predstavitvena stran in obrazec.
 * Barve prihajajo iz nastavitev kot CSS spremenljivke (glej BMG_Frontend::css_vars()).
 */

/* ------------------------------------------------------------------ */
/*  Postavitev                                                         */
/* ------------------------------------------------------------------ */

.bmg-section {
	background: var(--bmg-bg, #ECE9E4);
	color: var(--bmg-heading, #252628);
	min-height: 100vh;
	padding: 180px 0 100px;
	display: flex;
	align-items: center;
	box-sizing: border-box;
}

.bmg-section *,
.bmg-section *::before,
.bmg-section *::after {
	box-sizing: border-box;
}

.bmg-wrap {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 130px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 50px;
}

.bmg-intro {
	flex: 0 0 50%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.bmg-panel {
	flex: 1 1 auto;
	min-width: 0;
}

/* ------------------------------------------------------------------ */
/*  Levi stolpec                                                       */
/* ------------------------------------------------------------------ */

.bmg-headline {
	margin: 0;
	font-size: var(--h2, clamp(2rem, 0.92rem + 2.46vw, 3.75rem));
	font-weight: 500;
	line-height: 1em;
	color: var(--bmg-heading, #252628);
}

.bmg-rule {
	width: 100%;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--bmg-rule, #BEB7B0);
}

.bmg-description {
	margin: 0;
	font-size: var(--caption, 1.0625rem);
	font-weight: 400;
	line-height: 27px;
	color: var(--bmg-text, #8E8E93);
}

.bmg-description p {
	margin: 0 0 1em;
}

.bmg-description p:last-child {
	margin-bottom: 0;
}

.bmg-visual {
	margin: 20px 0 0;
}

.bmg-visual__img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ------------------------------------------------------------------ */
/*  Kartica z obrazcem                                                 */
/* ------------------------------------------------------------------ */

.bmg-card {
	background: var(--bmg-card, #FFFFFF);
	border-radius: var(--bmg-radius, 16px);
	padding: var(--bmg-pad, 40px);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.bmg-form {
	position: relative;
	margin: 0;
}

.bmg-row {
	margin-bottom: 26px;
}

.bmg-row--2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.bmg-row--3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.bmg-row--4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.bmg-row--2 > .bmg-field,
.bmg-row--3 > .bmg-field,
.bmg-row--4 > .bmg-field {
	margin-bottom: 0;
}

/* Vrstica pod soglasji stoji blize; soglasja imajo svoj razmik. */
.bmg-row--after {
	margin: 14px 0 0;
}

/* ------------------------------------------------------------------ */
/*  Polja                                                              */
/* ------------------------------------------------------------------ */

.bmg-field--input,
.bmg-field--textarea,
.bmg-field--select {
	position: relative;
	padding-top: 20px;
}

.bmg-field input[type="text"],
.bmg-field input[type="email"],
.bmg-field input[type="tel"],
.bmg-field input[type="url"],
.bmg-field input[type="number"],
.bmg-field input[type="date"],
.bmg-field select,
.bmg-field textarea {
	width: 100%;
	margin: 0;
	padding: 4px 0 12px;
	border: 0;
	border-bottom: 1px solid var(--bmg-field, #D8D8D8);
	border-radius: 0;
	background: transparent;
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: var(--bmg-input, #252628);
	outline: none;
	transition: border-color .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bmg-field textarea {
	resize: vertical;
	min-height: 84px;
}

.bmg-field input:focus,
.bmg-field select:focus,
.bmg-field textarea:focus {
	border-bottom-color: var(--bmg-focus, #1A1A1A);
}

/* Puscica pri izbirnih poljih. */
.bmg-field--select::after {
	content: "";
	position: absolute;
	right: 2px;
	bottom: 18px;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--bmg-heading, #1A1A1A);
	pointer-events: none;
}

.bmg-field select {
	padding-right: 22px;
	cursor: pointer;
}

/* Oznake polj. */
.bmg-field > label {
	position: absolute;
	left: 0;
	right: 0;
	top: 24px;
	font-size: 16px;
	line-height: 1.4;
	color: var(--bmg-label, var(--bmg-text, #6E6E6E));
	pointer-events: none;
	transition: top .18s ease, bottom .18s ease, font-size .18s ease, opacity .18s ease;
}

/*
 * Enovrsticna polja: napis je pripet na DNO, ne na vrh. Dolg napis se ob
 * ozkem zaslonu prelomi navzgor v prazen prostor nad poljem, namesto da bi
 * druga vrstica padla cez podcrtaj. Pri textarea to ne velja — tam je polje
 * visoko in napis mora ostati pri vrhu.
 */
.bmg-field--input > label,
.bmg-field--select > label {
	top: auto;
	bottom: 13px;
}

.bmg-req {
	color: var(--bmg-required, #E4322B);
	margin-left: 2px;
}

/* Nacin "float": oznaka se dvigne nad polje. */
.bmg-labels-float .bmg-field input:focus + label,
.bmg-labels-float .bmg-field input:not(:placeholder-shown) + label,
.bmg-labels-float .bmg-field textarea:focus + label,
.bmg-labels-float .bmg-field textarea:not(:placeholder-shown) + label,
.bmg-labels-float .bmg-field select:focus + label,
.bmg-labels-float .bmg-field select[data-empty="0"] + label {
	top: 0;
	bottom: auto;
	font-size: 12px;
}

/* Nacin "placeholder": oznaka izgine, tako kot na starem obrazcu. */
.bmg-labels-placeholder .bmg-field input:not(:placeholder-shown) + label,
.bmg-labels-placeholder .bmg-field textarea:not(:placeholder-shown) + label,
.bmg-labels-placeholder .bmg-field select[data-empty="0"] + label {
	opacity: 0;
}

/* ------------------------------------------------------------------ */
/*  Skupina potrditvenih polj                                          */
/* ------------------------------------------------------------------ */

.bmg-field--group {
	margin: 0;
	padding: 4px 0 0;
	border: 0;
}

.bmg-legend {
	display: block;
	padding: 0;
	margin: 0 0 14px;
	font-size: 16px;
	color: var(--bmg-card-text, var(--bmg-heading, #1A1A1A));
}

.bmg-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
}

.bmg-check {
	position: relative;
	display: inline-flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 15px;
	line-height: 1.4;
	color: var(--bmg-card-text, var(--bmg-heading, #1A1A1A));
}

.bmg-check input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.bmg-check__box {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border: 1.5px solid var(--bmg-field, #D8D8D8);
	border-radius: 3px;
	background: transparent;
	transition: border-color .15s ease, background .15s ease;
}

.bmg-check input:checked + .bmg-check__box {
	background: var(--bmg-check, #252628);
	border-color: var(--bmg-check, #252628);
}

.bmg-check input:checked + .bmg-check__box::after {
	content: "";
	display: block;
	width: 4px;
	height: 8px;
	margin: 2px auto 0;
	border: solid var(--bmg-check-mark, #FFFFFF);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.bmg-check input:focus-visible + .bmg-check__box {
	outline: 2px solid var(--bmg-focus, #1A1A1A);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/*  Samostojen gumb pod sliko                                          */
/* ------------------------------------------------------------------ */

.bmg-cta-wrap {
	margin: 26px 0 0;
}

.bmg-section .bmg-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 255px;
	max-width: 100%;
	padding: 15px 30px;
	border: 1px solid var(--bmg-cta-bg, var(--bmg-btn-bg, #E1D7CB));
	border-radius: 3px;
	background: var(--bmg-cta-bg, var(--bmg-btn-bg, #E1D7CB));
	color: var(--bmg-cta-text, var(--bmg-btn-text, #252628));
	font: inherit;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s ease, color .18s ease;
}

.bmg-section .bmg-cta:hover,
.bmg-section .bmg-cta:focus-visible {
	background: var(--bmg-cta-bg-hover, transparent);
	border-color: var(--bmg-cta-bg-hover, var(--bmg-cta-bg, var(--bmg-btn-bg, #E1D7CB)));
	color: var(--bmg-cta-text-hover, var(--bmg-cta-text, var(--bmg-btn-text, #252628)));
	text-decoration: none;
}

@media (max-width: 520px) {
	.bmg-section .bmg-cta {
		width: 100%;
		min-width: 0;
	}
}

/* ------------------------------------------------------------------ */
/*  Poljubna polja                                                     */
/* ------------------------------------------------------------------ */

/* Posamezno potrditveno polje s svojim napisom. */
.bmg-field--consent {
	position: relative;
	padding-top: 4px;
}

/*
 * Napis potrditvenega polja ni plavajoca oznaka: pravilo `.bmg-field >
 * label` ga sicer postavi absolutno na vrh obrazca in mu vzame klik.
 */
.bmg-field > label.bmg-check,
.bmg-checks > label.bmg-check {
	position: static;
	top: auto;
	pointer-events: auto;
}

.bmg-check--single {
	font-size: 15px;
	line-height: 1.4;
	color: var(--bmg-card-text, var(--bmg-heading, #1A1A1A));
}

.bmg-check--single .bmg-check__text a,
.bmg-check--radio .bmg-check__text a {
	color: inherit;
	text-decoration: underline;
}

/* Izbirni gumbi: okrogli okvir in pika namesto kljukice. */
.bmg-check--radio .bmg-check__box {
	border-radius: 50%;
}

.bmg-check--radio input:checked + .bmg-check__box::after {
	content: "";
	display: block;
	width: 6px;
	height: 6px;
	margin: 4px auto 0;
	border: 0;
	border-radius: 50%;
	background: var(--bmg-check-mark, #FFFFFF);
	transform: none;
}

/* Datum ima vedno vidno vrednost, zato oznaka stoji nad poljem. */
.bmg-field--date > label {
	top: 0;
	font-size: 12px;
}

/* Samo besedilo — obvestilo ali povezava brez vnosa. */
.bmg-field--note {
	font-size: 13px;
	line-height: 1.5;
	color: var(--bmg-label, var(--bmg-text, #6E6E6E));
}

.bmg-field--note a {
	color: inherit;
	text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/*  Soglasja, gumb, sporocila                                          */
/* ------------------------------------------------------------------ */

.bmg-consents {
	margin: 30px 0 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bmg-check--consent {
	font-size: 13px;
	line-height: 1.5;
	color: var(--bmg-label, var(--bmg-text, #6E6E6E));
	align-items: flex-start;
}

.bmg-check--consent .bmg-check__text a {
	color: inherit;
	text-decoration: underline;
}

.bmg-consents__note {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--bmg-label, var(--bmg-text, #6E6E6E));
	opacity: .85;
}

.bmg-actions {
	margin-top: 32px;
}

.bmg-card .bmg-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 255px;
	max-width: 100%;
	padding: 15px 30px;
	border: 1px solid var(--bmg-btn-bg, #E1D7CB);
	border-radius: 3px;
	background: var(--bmg-btn-bg, #E1D7CB);
	color: var(--bmg-btn-text, #252628);
	font: inherit;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color .18s ease;

	/*
	 * Dolg napis (npr. spanski) mora v ozko kartico. Tema gumbom rada
	 * postavi white-space: nowrap — takrat se besedilo ne prelomi, ampak
	 * odrezee, zato ga tu izrecno vrnemo na normal.
	 */
	white-space: normal;
	overflow-wrap: break-word;
	min-height: 52px;
	height: auto;
}

/* Tema (hello-elementor reset.css) barva vse <button> elemente rozasto;
   znotraj kartice to izklopimo. */
.bmg-card button,
.bmg-card button:hover,
.bmg-card button:focus {
	text-decoration: none;
}

/*
 * Hover. Dokler barvi za hover nista nastavljeni, ostane samo okvir v isti
 * barvi - ozadje je prosojno in se ravna po kartici pod njim. Ko je ozadje
 * hoverja nastavljeno, mu sledi tudi okvir.
 */
.bmg-card .bmg-submit:hover,
.bmg-card .bmg-submit:focus-visible {
	background: var(--bmg-btn-bg-hover, transparent);
	border-color: var(--bmg-btn-bg-hover, var(--bmg-btn-bg, #E1D7CB));
	color: var(--bmg-btn-text-hover, var(--bmg-btn-text, #252628));
}

.bmg-card .bmg-submit[disabled] {
	opacity: .6;
	cursor: default;
}

.bmg-error {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--bmg-required, #E4322B);
	min-height: 0;
}

.bmg-error:empty {
	display: none;
}

.bmg-notice {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--bmg-label, var(--bmg-text, #6E6E6E));
}

.bmg-notice:empty {
	display: none;
}

.bmg-field.is-invalid input,
.bmg-field.is-invalid select,
.bmg-field.is-invalid textarea {
	border-bottom-color: var(--bmg-required, #E4322B);
}

/* Past za robote. */
.bmg-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/*  Mobilno                                                            */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.bmg-wrap {
		padding: 0 60px;
		gap: 30px;
	}

	.bmg-intro {
		flex-basis: 40%;
	}
}

@media (max-width: 767px) {
	.bmg-section {
		padding: 150px 0 100px;
	}

	.bmg-wrap {
		padding: 0 50px;
		flex-direction: column;
		align-items: stretch;
		gap: 40px;
	}

	.bmg-intro {
		flex-basis: auto;
		text-align: center;
	}

	.bmg-headline {
		font-size: var(--h1, clamp(2.375rem, 1.258rem + 4.158vw, 5rem));
		letter-spacing: -0.5px;
	}

	.bmg-visual {
		margin-top: 0;
	}

	.bmg-card {
		padding: 20px;
	}
}

@media (max-width: 767px) {
	.bmg-row--3,
	.bmg-row--4 {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 520px) {
	.bmg-row--2,
	.bmg-row--3,
	.bmg-row--4 {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.bmg-card .bmg-submit {
		width: 100%;
		min-width: 0;
	}
}

/* ------------------------------------------------------------------ */
/*  Koraka "PIN" in "koncano", stran s prenosom                        */
/* ------------------------------------------------------------------ */

.bmg-mini-title {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--bmg-card-text, var(--bmg-heading, #252628));
}

.bmg-field--pin {
	max-width: 220px;
	margin-top: 18px;
}

.bmg-pin-input {
	letter-spacing: 8px;
	font-size: 22px !important;
}

.bmg-card .bmg-link {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 14px;
	color: var(--bmg-card-text, var(--bmg-heading, #252628));
	text-decoration: underline;
	cursor: pointer;
}

.bmg-card .bmg-link[disabled] {
	opacity: .5;
	cursor: default;
}

.bmg-file-links {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bmg-file-links li {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
}

/* Gumb za prenos nosi kratko oznako, zato se ne razteguje po sirini. */
.bmg-card .bmg-file-link {
	min-width: 0;
	max-width: 100%;
	padding: 14px 28px;
	text-decoration: none;
	white-space: nowrap;
}

.bmg-file-links .bmg-file-meta {
	font-size: 13px;
	line-height: 1.4;
	color: var(--bmg-label, var(--bmg-text, #8E8E93));
	overflow-wrap: anywhere;
}

.bmg-wrap--single {
	max-width: 760px;
	display: block;
}
