/**
 * BMA Iskra Distributors — javni prikaz.
 *
 * Barve prihajajo iz nastavitev kot CSS spremenljivke (BMD_Frontend::css_vars).
 * Tipografske velikosti povzemamo po spremenljivkah teme, s trdnim
 * nadomestkom, ce jih tema ne doloci.
 */

.bmd {
	background: var(--bmd-bg, #ECE9E4);
	color: var(--bmd-heading, #252628);
	padding: 100px 0;
	box-sizing: border-box;
	/* Odmiki se ravnajo po sirini odseka, ne okna: vticnik enako dobro
	   stoji cez celo sirino strani in v ozjem stolpcu teme. */
	container-type: inline-size;
}

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

/* Nase razporeditve (flex, grid) bi sicer premagale atribut hidden. */
.bmd [hidden] {
	display: none !important;
}

.bmd-wrap {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 40px;
}

@container (min-width: 1200px) {
	.bmd-wrap {
		padding: 0 130px;
	}
}

.bmd .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/*  Glava                                                              */
/* ------------------------------------------------------------------ */

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

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

.bmd-head-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px 50px;
	padding-top: 24px;
}

.bmd-intro {
	margin: 0;
	flex: 1 1 min(62ch, 100%);
	max-width: 62ch;
	min-width: 0;
	font-size: var(--caption, 1.0625rem);
	line-height: 27px;
	color: var(--bmd-text, #8E8E93);
}

/*
 * Stevilki z napisoma. Napisa sta nastavljiva, torej poljubno dolga:
 * postavitev zato nikjer ne racuna na kratko besedo — bloka se prelomita
 * v svojo vrstico, napis pa se prelomi znotraj bloka.
 */
.bmd-count {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: flex-start;
	gap: 16px 40px;
	flex: 0 1 auto;
	min-width: 0;
	/* Ce ju dolg napis potisne v svojo vrstico, ostaneta ob desnem robu. */
	margin: 0 0 0 auto;
}

.bmd-stat {
	margin: 0;
	min-width: 0;
	max-width: 24ch;
	text-align: right;
}

.bmd-stat-num {
	display: block;
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--bmd-heading, #252628);
}

.bmd-stat-lbl {
	display: block;
	margin-top: 4px;
	font-size: 0.8125rem;
	line-height: 1.35;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bmd-text, #8E8E93);
	overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ */
/*  Oder: zemljevid in kartica                                         */
/* ------------------------------------------------------------------ */

.bmd-stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 24px;
	margin: 44px 0 0;
	align-items: stretch;
}

.bmd-map {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--bmd-card, #fff);
	border-radius: var(--bmd-radius, 4px);
	overflow: hidden;
	min-height: 340px;
}

.bmd-map-canvas {
	display: block;
	width: 100%;
}

/* SVG nosi viewBox, zato mu visino doloci lastno razmerje stranic. */
.bmd-svg {
	display: block;
	width: 100%;
	height: auto;
	touch-action: none;
	cursor: grab;
	background: var(--bmd-card, #fff);
}

.bmd-map.is-dragging .bmd-svg {
	cursor: grabbing;
}

.bmd-svg.is-hot {
	cursor: pointer;
}

.bmd-land {
	fill: var(--bmd-land, #E6E2DC);
	stroke: var(--bmd-card, #fff);
	stroke-width: 0.6;
	vector-effect: non-scaling-stroke;
	transition: fill 0.18s ease, opacity 0.18s ease;
}

.bmd-land {
	cursor: pointer;
}

.bmd-land.is-on {
	fill: var(--bmd-land-on, #B5ADA4);
}

.bmd-land:not(.is-on):hover {
	fill: #D6D1CA;
}

.bmd-land:focus,
.bmd-pin:focus {
	outline: none;
}

.bmd-land.is-on:hover,
.bmd-land.is-on:focus-visible {
	fill: var(--bmd-text, #8E8E93);
}

/* Tipkovnicna izbira mora biti vidna tudi brez privzetega obrisa. */
.bmd-land.is-on:focus-visible {
	stroke: var(--bmd-accent, #CB2D30);
	stroke-width: 2.4;
}

.bmd-pin:focus-visible .bmd-pin-dot {
	stroke: var(--bmd-accent, #CB2D30);
	stroke-width: 2.4;
}

.bmd-land.is-off {
	fill: var(--bmd-land, #E6E2DC);
}

/* Izbrana drzava potemni; rdeca ostane poudarek na tocki in v tabeli. */
.bmd-land.is-sel,
.bmd-land.is-sel:hover {
	fill: var(--bmd-marker, #252628);
}

/* Tocke */

.bmd-pin {
	cursor: pointer;
	transition: opacity 0.18s ease;
}

.bmd-pin-hit {
	pointer-events: all;
}

.bmd-pin-halo {
	fill: var(--bmd-marker, #252628);
	opacity: 0.12;
	pointer-events: none;
	transform-origin: center;
	transition: opacity 0.18s ease;
}

.bmd-pin-dot {
	fill: var(--bmd-marker, #252628);
	stroke: var(--bmd-card, #fff);
	stroke-width: 1.4;
	transition: fill 0.18s ease;
}

.bmd-pin-num {
	fill: var(--bmd-card, #fff);
	font-size: 7.5px;
	font-weight: 600;
	pointer-events: none;
	letter-spacing: -0.02em;
}

.bmd-pin:hover .bmd-pin-halo,
.bmd-pin:focus-visible .bmd-pin-halo {
	opacity: 0.3;
}

.bmd-pin.is-sel .bmd-pin-dot {
	fill: var(--bmd-accent, #CB2D30);
}

.bmd-pin.is-sel .bmd-pin-halo {
	fill: var(--bmd-accent, #CB2D30);
	opacity: 0.28;
}

.bmd-pin.is-off {
	opacity: 0.18;
	pointer-events: none;
}

/* Krmilniki in namig */

/* Levo spodaj: privzeti izsek ima Avstralijo v desnem spodnjem kotu,
   kjer so gumbi prej pokrivali njeno tocko. */
.bmd-map-controls {
	position: absolute;
	left: 16px;
	bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	z-index: 2;
}

.bmd-zoom {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: var(--bmd-heading, #252628);
	background: var(--bmd-card, #fff);
	border: 1px solid var(--bmd-rule, #BEB7B0);
	border-radius: 2px;
	transition: background 0.15s ease, color 0.15s ease;
}

.bmd-zoom:hover {
	background: var(--bmd-btn-bg, #E1D7CB);
}

.bmd-zoom--reset {
	margin-top: 4px;
}

.bmd-tip {
	position: absolute;
	z-index: 3;
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 14px));
	padding: 6px 10px;
	font-size: 0.75rem;
	line-height: 1.3;
	white-space: nowrap;
	color: var(--bmd-card, #fff);
	background: var(--bmd-heading, #252628);
	border-radius: 2px;
	opacity: 0;
	transition: opacity 0.14s ease;
}

.bmd-tip.is-on {
	opacity: 1;
}

/* ------------------------------------------------------------------ */
/*  Stranska kartica                                                   */
/* ------------------------------------------------------------------ */

.bmd-detail {
	position: relative;
	background: var(--bmd-card, #fff);
	border-radius: var(--bmd-radius, 4px);
	padding: 28px;
	overflow-y: auto;
	max-height: 620px;
}

.bmd-detail-empty {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	min-height: 200px;
}

.bmd-detail-title {
	margin: 0 0 10px;
	font-size: 1.0625rem;
	font-weight: 500;
	color: var(--bmd-heading, #252628);
}

.bmd-detail-hint {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--bmd-text, #8E8E93);
}

.bmd-detail-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 16px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--bmd-rule, #BEB7B0);
}

.bmd-detail-eyebrow {
	display: block;
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bmd-text, #8E8E93);
	margin-bottom: 6px;
}

.bmd-detail-country {
	margin: 0;
	font-size: 1.375rem;
	font-weight: 500;
	line-height: 1.15;
	color: var(--bmd-heading, #252628);
}

.bmd-detail-close {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--bmd-text, #8E8E93);
	background: none;
	border: 0;
	transition: color 0.15s ease;
}

.bmd-detail-close:hover {
	color: var(--bmd-heading, #252628);
}

.bmd-detail-none {
	margin: 0 0 8px;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--bmd-text, #8E8E93);
}

.bmd-card {
	padding: 18px 0;
	border-bottom: 1px solid var(--bmd-rule, #BEB7B0);
	transition: background 0.4s ease;
}

.bmd-card:first-of-type {
	padding-top: 0;
}

.bmd-card:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.bmd-card.is-hot {
	background: var(--bmd-btn-bg, #E1D7CB);
	box-shadow: 0 0 0 12px var(--bmd-btn-bg, #E1D7CB);
	border-radius: 2px;
}

.bmd-card-name {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--bmd-heading, #252628);
}

.bmd-card-legal,
.bmd-card-addr {
	margin: 0 0 4px;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--bmd-text, #8E8E93);
}

.bmd-card-tags {
	margin: 10px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.bmd-tag {
	display: inline-block;
	padding: 3px 9px;
	font-size: 0.6875rem;
	letter-spacing: 0.03em;
	line-height: 1.4;
	color: var(--bmd-heading, #252628);
	background: var(--bmd-bg, #ECE9E4);
	border-radius: 999px;
	white-space: nowrap;
}

.bmd-tag--line {
	background: none;
	border: 1px solid var(--bmd-rule, #BEB7B0);
}

.bmd-card-rows {
	margin: 14px 0 0;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 5px 14px;
	font-size: 0.8125rem;
	line-height: 1.5;
}

.bmd-card-rows dt {
	margin: 0;
	color: var(--bmd-text, #8E8E93);
	white-space: nowrap;
}

.bmd-card-rows dd {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
	color: var(--bmd-heading, #252628);
}

.bmd-card-note {
	margin: 12px 0 0;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--bmd-text, #8E8E93);
}

.bmd a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid var(--bmd-rule, #BEB7B0);
	transition: border-color 0.15s ease;
}

.bmd a:hover {
	border-bottom-color: var(--bmd-heading, #252628);
}

/* ------------------------------------------------------------------ */
/*  Filtri                                                             */
/* ------------------------------------------------------------------ */

.bmd-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 44px 0 0;
}

.bmd-field {
	position: relative;
	flex: 0 0 auto;
}

.bmd-field--search {
	flex: 1 1 280px;
	min-width: 240px;
}

.bmd-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bmd-text, #8E8E93);
	pointer-events: none;
}

.bmd input[type="search"],
.bmd select {
	width: 100%;
	height: 46px;
	padding: 0 16px;
	font: inherit;
	font-size: 0.9375rem;
	color: var(--bmd-heading, #252628);
	background: var(--bmd-card, #fff);
	border: 1px solid transparent;
	border-radius: var(--bmd-radius, 4px);
	outline: none;
	transition: border-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bmd input[type="search"] {
	padding-left: 42px;
}

.bmd select {
	padding-right: 38px;
	cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
		linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

.bmd input[type="search"]:focus,
.bmd select:focus {
	border-color: var(--bmd-heading, #252628);
}

.bmd input[type="search"]::placeholder {
	color: var(--bmd-text, #8E8E93);
}

.bmd-clear {
	height: 46px;
	padding: 0 20px;
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
	color: var(--bmd-btn-text, #252628);
	background: var(--bmd-btn-bg, #E1D7CB);
	border: 1px solid var(--bmd-btn-bg, #E1D7CB);
	border-radius: var(--bmd-radius, 4px);
	transition: background 0.15s ease;
}

.bmd-clear:hover {
	background: transparent;
}

/* Vrstica stanja */

.bmd-status {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0 0;
	min-height: 28px;
}

.bmd-status-count {
	margin: 0;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bmd-text, #8E8E93);
}

.bmd-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px;
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
	color: var(--bmd-card, #fff);
	background: var(--bmd-accent, #CB2D30);
	border: 0;
	border-radius: 999px;
}

.bmd-chip-x {
	font-size: 15px;
	line-height: 1;
	opacity: 0.75;
}

/* ------------------------------------------------------------------ */
/*  Tabela                                                             */
/* ------------------------------------------------------------------ */

.bmd-table-wrap {
	margin: 16px 0 0;
	overflow-x: auto;
}

.bmd-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	background: none;
}

.bmd .bmd-table th,
.bmd .bmd-table td {
	padding: 16px 16px 16px 0;
	text-align: left;
	vertical-align: top;
	border: 0;
	/* Tema celicam tabele doda svetlo ozadje; tu ga odstranimo. */
	background-color: transparent;
}

.bmd-table thead th {
	padding-top: 0;
	padding-bottom: 12px;
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bmd-text, #8E8E93);
	border-bottom: 1px solid var(--bmd-rule, #BEB7B0);
	white-space: nowrap;
}

.bmd-sort {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
	cursor: pointer;
	background: none;
	border: 0;
}

.bmd-sort:hover {
	color: var(--bmd-heading, #252628);
}

.bmd-caret {
	width: 0;
	height: 0;
	border-left: 3.5px solid transparent;
	border-right: 3.5px solid transparent;
	border-top: 4px solid currentColor;
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.bmd-sort.is-sorted {
	color: var(--bmd-heading, #252628);
}

.bmd-sort.is-sorted .bmd-caret {
	opacity: 1;
}

.bmd-sort.is-desc .bmd-caret {
	transform: rotate(180deg);
}

.bmd-row {
	cursor: pointer;
	border-bottom: 1px solid var(--bmd-rule, #BEB7B0);
	transition: background 0.15s ease;
}

.bmd-row:hover {
	background: rgba(255, 255, 255, 0.55);
}

.bmd-row:focus-visible {
	outline: 2px solid var(--bmd-heading, #252628);
	outline-offset: -2px;
}

.bmd-row.is-sel {
	background: var(--bmd-card, #fff);
}

.bmd-row.is-sel td,
.bmd-row.is-open td {
	background-color: transparent;
}

.bmd-row.is-sel .bmd-col-country {
	box-shadow: inset 3px 0 0 var(--bmd-accent, #CB2D30);
}

.bmd-row.is-open {
	border-bottom-color: transparent;
	background: var(--bmd-card, #fff);
}

.bmd-col-country {
	padding-left: 12px !important;
	white-space: nowrap;
}

.bmd-iso {
	display: inline-block;
	min-width: 30px;
	margin-right: 10px;
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	color: var(--bmd-text, #8E8E93);
	vertical-align: 1px;
}

.bmd-country-name {
	color: var(--bmd-heading, #252628);
}

.bmd-company {
	display: block;
	color: var(--bmd-heading, #252628);
}

.bmd-city {
	display: block;
	margin-top: 2px;
	font-size: 0.8125rem;
	color: var(--bmd-text, #8E8E93);
}

.bmd-col-person,
.bmd-col-contact {
	color: var(--bmd-text, #8E8E93);
}

.bmd-col-contact a {
	display: block;
	color: var(--bmd-heading, #252628);
	border-bottom: 0;
	overflow-wrap: anywhere;
}

.bmd-col-contact a:hover {
	text-decoration: underline;
}

.bmd-dash {
	color: var(--bmd-rule, #BEB7B0);
}

.bmd-col-more {
	width: 44px;
	padding-right: 0 !important;
	text-align: right;
}

.bmd-more {
	position: relative;
	width: 26px;
	height: 26px;
	padding: 0;
	cursor: pointer;
	background: none;
	border: 1px solid var(--bmd-rule, #BEB7B0);
	border-radius: 50%;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.bmd-more::before,
.bmd-more::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	background: var(--bmd-heading, #252628);
	transform: translate(-50%, -50%);
	transition: opacity 0.15s ease;
}

.bmd-more::before {
	width: 9px;
	height: 1px;
}

.bmd-more::after {
	width: 1px;
	height: 9px;
}

.bmd-more:hover {
	background: var(--bmd-btn-bg, #E1D7CB);
	border-color: var(--bmd-btn-bg, #E1D7CB);
}

.bmd-more[aria-expanded="true"]::after {
	opacity: 0;
}

.bmd .bmd-row-detail td {
	padding-top: 0;
	padding-bottom: 22px;
	background-color: var(--bmd-card, #fff);
	border-bottom: 1px solid var(--bmd-rule, #BEB7B0);
}

.bmd-row-detail-inner {
	display: grid;
	gap: 8px;
	padding-left: 12px;
}

.bmd-kv {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: 14px;
	font-size: 0.875rem;
	line-height: 1.5;
}

.bmd-k {
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bmd-text, #8E8E93);
	padding-top: 3px;
}

.bmd-v {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	align-items: center;
	color: var(--bmd-heading, #252628);
}

.bmd-note {
	color: var(--bmd-text, #8E8E93);
}

.bmd-empty {
	margin: 32px 0;
	text-align: center;
	font-size: 0.9375rem;
	color: var(--bmd-text, #8E8E93);
}

.bmd-foot {
	margin: 36px 0 0;
	padding-top: 22px;
	border-top: 1px solid var(--bmd-rule, #BEB7B0);
}

.bmd-foot p {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--bmd-text, #8E8E93);
}

/* ------------------------------------------------------------------ */
/*  Ozji zasloni                                                       */
/* ------------------------------------------------------------------ */

@container (max-width: 1100px) {
	.bmd-stage {
		grid-template-columns: minmax(0, 1fr) 320px;
	}
}

@container (max-width: 900px) {
	.bmd-stage {
		grid-template-columns: minmax(0, 1fr);
	}

	.bmd-detail {
		max-height: none;
	}

	.bmd-detail-empty {
		min-height: 0;
	}
}

@container (max-width: 700px) {
	.bmd {
		padding: 60px 0;
	}

	.bmd-wrap {
		padding: 0 24px;
	}

	.bmd-head-row {
		flex-direction: column;
		gap: 18px;
	}

	.bmd-count {
		justify-content: flex-start;
		gap: 14px 32px;
		margin-left: 0;
	}

	.bmd-stat {
		text-align: left;
	}

	.bmd-field,
	.bmd-field--search {
		flex: 1 1 100%;
		min-width: 0;
	}

	.bmd-clear {
		width: 100%;
	}

	/* Tabela kot seznam kartic — vodoravno drsenje na telefonu ni v pomoc. */
	.bmd-table,
	.bmd-table tbody,
	.bmd-table tr,
	.bmd-table td {
		display: block;
	}

	.bmd-table thead {
		display: none;
	}

	.bmd-row {
		position: relative;
		padding: 16px 44px 16px 12px;
	}

	.bmd .bmd-table td {
		padding: 0 0 6px;
	}

	.bmd .bmd-table td:last-child {
		padding-bottom: 0;
	}

	.bmd .bmd-col-country {
		padding-left: 0 !important;
		font-size: 0.6875rem;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--bmd-text, #8E8E93);
	}

	.bmd-col-country .bmd-country-name {
		color: var(--bmd-text, #8E8E93);
	}

	.bmd .bmd-col-more {
		position: absolute;
		right: 12px;
		top: 14px;
		left: auto;
		width: auto;
		padding: 0 !important;
	}

	.bmd .bmd-row-detail td {
		padding: 0 12px 18px;
	}

	.bmd-row-detail-inner {
		padding-left: 0;
	}

	.bmd-kv {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}
}

/* Manj gibanja, ce si ga obiskovalec ne zeli. */
@container (max-width: 420px) {
	.bmd-count {
		flex-direction: column;
		gap: 14px;
	}

	.bmd-stat {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bmd * {
		transition-duration: 0.01ms !important;
	}
}
