/*
 * Flow2Web Multilingual: language switcher, first-visit suggestion and the Cyrillic font.
 * Uses the Services landing design tokens (--f2w-service-*) so it matches the existing header.
 */

/* Poppins (theme font) has no Cyrillic glyphs. Montserrat (OFL, self-hosted, ~54 KB variable font) is registered under the
   SAME family name for the Cyrillic range only. One face per exact weight (300-700): browsers pick a face set by weight
   first, so the descriptors must match the Poppins faces for Latin (Poppins) + Cyrillic (Montserrat) to be combined. */
@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/montserrat-cyrillic-var.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/montserrat-cyrillic-var.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/montserrat-cyrillic-var.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/montserrat-cyrillic-var.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/montserrat-cyrillic-var.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- Switcher (same pill as the previous static language indicator) ---------- */

.f2w-ml-switcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 49px;
	padding: 0 8px 0 22px;
	border: 1px solid var(--f2w-service-line, #e6e6e6);
	border-radius: 999px;
	background: #fff;
	font-size: 16px;
	font-weight: 600;
}

.f2w-ml-switcher__list {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.f2w-ml-switcher__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 36px;
	padding: 0 10px;
	border-radius: 999px;
	color: var(--f2w-service-muted, #6b6b6b);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.f2w-ml-switcher__link:hover {
	color: var(--f2w-service-ink, #0b0b0b);
}

.f2w-ml-switcher__link.is-current {
	background: var(--f2w-service-accent, #cfde4d);
	color: var(--f2w-service-ink, #0b0b0b);
}

.f2w-ml-switcher__link:focus-visible {
	outline: 2px solid var(--f2w-service-ink, #0b0b0b);
	outline-offset: 2px;
}

/* The old indicator was hidden on phones; the switcher must stay reachable, so it only gets more compact. */
@media (max-width: 767px) {
	.f2w-ml-switcher {
		min-height: 44px;
		gap: 6px;
		padding: 0 4px 0 12px;
		font-size: 14px;
	}

	.f2w-ml-switcher .f2w-service-img-icon {
		width: 18px;
		height: 18px;
	}

	.f2w-ml-switcher__link {
		min-width: 34px;
		min-height: 34px;
		padding: 0 8px;
	}

	/* Keep the header on one row: the two items sit tighter and the CTA gives a little room. */
	.f2w-service-header__actions {
		gap: 8px;
	}

	.f2w-service-header__actions .f2w-service-button--header {
		padding: 0 14px;
	}
}

@media (max-width: 389px) {
	.f2w-ml-switcher .f2w-service-img-icon {
		display: none;
	}

	.f2w-ml-switcher {
		padding-left: 4px;
	}
}

/* ---------- First-visit suggestion (hidden by default, revealed by language-suggest.js) ---------- */

.f2w-ml-suggest {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9000;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: min(520px, calc(100vw - 40px));
	padding: 12px 14px 12px 20px;
	border: 1px solid var(--f2w-service-line, #e6e6e6);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
	font-family: 'Poppins', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: var(--f2w-service-ink, #0b0b0b);
}

.f2w-ml-suggest[hidden] {
	display: none;
}

.f2w-ml-suggest__text {
	margin: 0;
	flex: 1 1 auto;
}

.f2w-ml-suggest__link {
	flex: none;
	padding: 9px 16px;
	border-radius: 999px;
	background: var(--f2w-service-accent, #cfde4d);
	color: var(--f2w-service-ink, #0b0b0b);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.f2w-ml-suggest__link:focus-visible,
.f2w-ml-suggest__close:focus-visible {
	outline: 2px solid var(--f2w-service-ink, #0b0b0b);
	outline-offset: 2px;
}

.f2w-ml-suggest__close {
	flex: none;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--f2w-service-muted, #6b6b6b);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 559px) {
	.f2w-ml-suggest {
		right: 12px;
		left: 12px;
		bottom: 12px;
		max-width: none;
		flex-wrap: wrap;
		gap: 8px 12px;
		padding: 14px 14px 14px 16px;
	}

	.f2w-ml-suggest__text {
		flex-basis: calc(100% - 44px);
	}
}

/* Narrow phones (<= 440px): the header row (logo + switcher + CTA) must stay on one line, also with the longer
   Macedonian button label. */
@media (max-width: 440px) {
	.f2w-ml-switcher .f2w-service-img-icon {
		display: none;
	}

	.f2w-ml-switcher {
		padding-left: 4px;
	}

	.f2w-service-header__actions .f2w-service-button--header {
		padding: 0 12px;
		font-size: 13px;
		gap: 6px;
	}

	.f2w-service-header__logo img {
		width: 56px;
	}
}

.f2w-service-header__logo {
	flex: none;
}

@media (max-width: 400px) {
	.f2w-service-header__logo img {
		width: 48px;
	}

	.f2w-service-header__actions .f2w-service-button--header {
		padding: 0 10px;
		font-size: 12px;
	}

	.f2w-service-header__actions .f2w-service-button--header .f2w-service-img-icon {
		display: none;
	}

	.f2w-ml-switcher__link {
		min-width: 30px;
		padding: 0 6px;
	}
}
