/*
 * DS Dent Consent: the cookie popup and the cover over held Google Maps frames.
 *
 * Colours, type and buttons follow the site: blue #3ca5da (primary), navy #02334d (accent,
 * button hover), Jost for the heading, Rubik for text, 5 px button corners, white cards with
 * a soft shadow. The popup is a card in the lower left corner (clear of the "to top" button
 * and the hero's pause button on the right); on phones it is a sheet along the bottom edge.
 */

.dsdent-consent {
	--dsdent-consent-blue: #3ca5da;
	--dsdent-consent-navy: #02334d;
	--dsdent-consent-ink: #091d3e;
	--dsdent-consent-text: #4d5663;
	bottom: 24px;
	left: 24px;
	max-width: calc(100vw - 48px);
	opacity: 0;
	position: fixed;
	transform: translateY(16px);
	transition: opacity 0.35s ease, transform 0.35s ease;
	width: 470px;
	z-index: 100000;
}

.dsdent-consent[hidden] {
	display: none;
}

.dsdent-consent.is-open {
	opacity: 1;
	transform: none;
}

.dsdent-consent__card {
	background: #fff;
	border-radius: 10px;
	border-top: 4px solid var(--dsdent-consent-blue);
	box-shadow: 0 18px 50px rgba(9, 29, 62, 0.22), 0 2px 6px rgba(9, 29, 62, 0.08);
	box-sizing: border-box;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 26px 28px 24px;
}

.dsdent-consent .dsdent-consent__title {
	color: var(--dsdent-consent-ink);
	font-family: Jost, sans-serif;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0 0 10px;
	padding: 0;
	text-transform: none;
}

.dsdent-consent .dsdent-consent__title:focus {
	outline: none;
}

.dsdent-consent .dsdent-consent__text {
	color: var(--dsdent-consent-text);
	font-family: Rubik, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
	padding: 0;
}

.dsdent-consent .dsdent-consent__policy {
	color: var(--dsdent-consent-navy);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.dsdent-consent .dsdent-consent__policy:hover {
	color: var(--dsdent-consent-blue);
}

/* The groups, shown under "Postavke". */
.dsdent-consent__options {
	border-top: 1px solid #e3eaf0;
	margin-top: 18px;
	padding-top: 4px;
}

.dsdent-consent__options[hidden] {
	display: none;
}

.dsdent-consent .dsdent-consent__option {
	align-items: flex-start;
	border-bottom: 1px solid #e3eaf0;
	color: var(--dsdent-consent-text);
	cursor: pointer;
	display: flex;
	font-family: Rubik, sans-serif;
	font-size: 14px;
	font-weight: 400;
	gap: 14px;
	line-height: 1.5;
	margin: 0;
	padding: 14px 0;
}

.dsdent-consent__option-text strong {
	color: var(--dsdent-consent-ink);
	display: block;
	font-size: 15px;
	font-weight: 500;
}

/*
 * A checkbox drawn as a switch. The theme forces a fixed look on every checkbox with
 * !important rules, so the checkbox itself is kept invisible (still focusable and read by
 * screen readers) and the switch is a separate element right after it.
 */
.dsdent-consent .dsdent-consent__option {
	position: relative;
}

.dsdent-consent .dsdent-consent__check {
	left: 0;
	margin: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	top: 16px;
}

.dsdent-consent__switch {
	background: #c3ccd6;
	border-radius: 12px;
	flex: 0 0 42px;
	height: 24px;
	margin-top: 2px;
	position: relative;
	transition: background-color 0.2s ease;
	width: 42px;
}

.dsdent-consent__switch::before {
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(9, 29, 62, 0.3);
	content: "";
	height: 18px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: transform 0.2s ease;
	width: 18px;
}

.dsdent-consent__check:checked + .dsdent-consent__switch {
	background: var(--dsdent-consent-blue);
}

.dsdent-consent__check:checked + .dsdent-consent__switch::before {
	transform: translateX(18px);
}

.dsdent-consent__check:disabled + .dsdent-consent__switch {
	opacity: 0.55;
}

.dsdent-consent__check:disabled ~ .dsdent-consent__option-text {
	cursor: default;
}

.dsdent-consent__check:focus-visible + .dsdent-consent__switch {
	outline: 3px solid #091d3e;
	outline-offset: 2px;
}

/* Buttons: "accept" and "reject" have the same size and weight. */
.dsdent-consent__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.dsdent-consent__button,
.dsdent-consent-embed .dsdent-consent__button {
	border: 2px solid transparent;
	border-radius: 5px;
	box-shadow: none;
	box-sizing: border-box;
	cursor: pointer;
	font-family: Rubik, sans-serif;
	font-size: 15px;
	font-weight: 500;
	height: auto;
	letter-spacing: 0;
	line-height: 20px;
	margin: 0;
	padding: 12px 20px;
	text-transform: none;
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
	width: auto;
}

.dsdent-consent__button[hidden] {
	display: none;
}

.dsdent-consent__button--primary,
.dsdent-consent-embed .dsdent-consent__button--primary {
	background: #3ca5da;
	border-color: #3ca5da;
	color: #fff;
}

.dsdent-consent__button--primary:hover,
.dsdent-consent__button--primary:focus-visible,
.dsdent-consent-embed .dsdent-consent__button--primary:hover {
	background: #02334d;
	border-color: #02334d;
	color: #fff;
}

.dsdent-consent__button--secondary {
	background: #fff;
	border-color: #02334d;
	color: #02334d;
}

.dsdent-consent__button--secondary:hover,
.dsdent-consent__button--secondary:focus-visible {
	background: #02334d;
	color: #fff;
}

.dsdent-consent__button--link {
	background: none;
	border-color: transparent;
	color: #02334d;
	margin-left: auto;
	padding: 12px 6px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dsdent-consent__button--link:hover {
	background: none;
	color: #3ca5da;
}

.dsdent-consent__button:focus-visible,
.dsdent-consent .dsdent-consent__policy:focus-visible {
	outline: 3px solid #091d3e;
	outline-offset: 2px;
}

/* Phones: a sheet along the bottom edge, buttons stacked full width. */
@media (max-width: 600px) {
	.dsdent-consent {
		bottom: 0;
		left: 0;
		max-width: none;
		width: 100%;
	}

	.dsdent-consent__card {
		border-radius: 14px 14px 0 0;
		max-height: 88vh;
		padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px));
	}

	.dsdent-consent .dsdent-consent__title {
		font-size: 20px;
	}

	.dsdent-consent .dsdent-consent__text {
		font-size: 14px;
	}

	.dsdent-consent__actions {
		gap: 8px;
	}

	.dsdent-consent__actions .dsdent-consent__button--primary,
	.dsdent-consent__actions .dsdent-consent__button--secondary {
		flex: 1 1 calc(50% - 4px);
		padding-left: 10px;
		padding-right: 10px;
	}

	.dsdent-consent__button--link {
		flex: 1 1 100%;
		margin: 0;
		padding: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dsdent-consent,
	.dsdent-consent__switch,
	.dsdent-consent__switch::before {
		transition: none;
	}

	.dsdent-consent {
		transform: none;
	}
}

/* ---------------------------------------------------------------- held Google Maps frames */

.dsdent-consent-embed {
	position: relative;
}

.dsdent-consent-embed__cover {
	align-items: center;
	background: #eaf3f8;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 14px;
	inset: 0;
	justify-content: center;
	line-height: 1.5;
	padding: 24px;
	position: absolute;
	text-align: center;
}

.dsdent-consent-embed.is-loaded .dsdent-consent-embed__cover {
	display: none;
}

.dsdent-consent-embed .dsdent-consent-embed__text {
	color: #4d5663;
	font-family: Rubik, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
	max-width: 460px;
}

.dsdent-consent-embed .dsdent-consent-embed__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	justify-content: center;
	margin: 0;
}

.dsdent-consent-embed .dsdent-consent-embed__link {
	color: #02334d;
	font-family: Rubik, sans-serif;
	font-size: 15px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dsdent-consent-embed .dsdent-consent-embed__link:hover {
	color: #3ca5da;
}

/* ---------------------------------------------------------------- reCAPTCHA, loaded on demand */

/* The box is 78 px tall. Its place is kept, so the form does not jump when it appears. */
.wpcf7 .wpcf7-recaptcha {
	display: block;
	min-height: 78px;
}
