/* ======================================================================
   SR Mobile Bottom Navigation — Snalažljivi Roditelji
   Shown below 48em (same breakpoint where HivePress switches to phones).
   ====================================================================== */

:root {
	--sr-mnav-bg: rgba(31, 27, 45, 0.96);     /* site ink #1F1B2D */
	--sr-mnav-border: rgba(255, 255, 255, 0.08);
	--sr-mnav-text: rgba(255, 255, 255, 0.62);
	--sr-mnav-active: #FFC107;                /* site gold */
	--sr-mnav-bubble: #FFC107;
	--sr-mnav-bubble-icon: #1F1B2D;
	--sr-mnav-panel-bg: #2A2539;
	--sr-mnav-overlay: rgba(15, 12, 24, 0.55);
	--sr-mnav-height: 64px;
}

/* Hidden on tablets and desktop */
.sr-mnav,
.sr-mnav-overlay,
.sr-mnav-panel {
	display: none;
}

@media (max-width: 47.99em) {

	/* ---------- Bar ---------- */
	.sr-mnav {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		padding-bottom: env(safe-area-inset-bottom, 0);
		background: var(--sr-mnav-bg);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		border-top: 1px solid var(--sr-mnav-border);
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.28);
	}

	/* Keep page content and the footer clear of the bar */
	body {
		padding-bottom: calc(var(--sr-mnav-height) + env(safe-area-inset-bottom, 0px));
	}

	.sr-mnav__items {
		display: flex;
		align-items: stretch;
		max-width: 560px;
		margin: 0 auto;
		padding: 0;
		list-style: none;
	}

	.sr-mnav__item {
		position: relative;
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
	}

	/* Links and the "Više" button share one look */
	.sr-mnav__item > a,
	.sr-mnav__more {
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-end;
		gap: 4px;
		width: 100%;
		min-height: var(--sr-mnav-height);
		padding: 10px 2px 9px;
		margin: 0;
		border: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
		color: var(--sr-mnav-text);
		font-family: Nunito, system-ui, sans-serif;
		font-size: 11px;
		font-weight: 700;
		line-height: 1.1;
		letter-spacing: 0.2px;
		text-decoration: none;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: color 0.2s ease;
	}

	.sr-mnav .sr-mnav__icon {
		width: 22px;
		height: 22px;
		flex: none;
	}

	.sr-mnav__label {
		max-width: 100%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.sr-mnav__item > a:hover,
	.sr-mnav__more:hover,
	.sr-mnav__item.is-active > a,
	.sr-mnav__more[aria-expanded="true"] {
		color: var(--sr-mnav-active);
	}

	.sr-mnav__item > a:focus-visible,
	.sr-mnav__more:focus-visible {
		outline: 2px solid var(--sr-mnav-active);
		outline-offset: -4px;
		border-radius: 12px;
	}

	/* Active indicator line */
	.sr-mnav__item.is-active::before {
		content: "";
		position: absolute;
		top: 0;
		left: 50%;
		width: 22px;
		height: 3px;
		border-radius: 0 0 3px 3px;
		background: var(--sr-mnav-active);
		transform: translateX(-50%);
	}

	/* ---------- Centre "Profil" bubble ---------- */
	.sr-mnav__item--center > a {
		color: rgba(255, 255, 255, 0.85);
	}

	.sr-mnav__item--center.is-active::before {
		display: none;
	}

	.sr-mnav__bubble {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 50px;
		height: 50px;
		margin-top: -26px;
		border-radius: 50%;
		background: var(--sr-mnav-bubble);
		color: var(--sr-mnav-bubble-icon);
		box-shadow: 0 0 0 4px rgba(31, 27, 45, 0.96), 0 6px 18px rgba(255, 193, 7, 0.38);
		transition: transform 0.2s ease;
	}

	.sr-mnav__item--center > a:hover .sr-mnav__bubble,
	.sr-mnav__item--center.is-active .sr-mnav__bubble {
		transform: scale(1.06);
	}

	/* ---------- Overlay + slide-up "Više" panel ---------- */
	.sr-mnav-overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 9991;
		background: var(--sr-mnav-overlay);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0s linear 0.3s;
	}

	.sr-mnav-panel {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9992;
		max-height: 75vh;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding-bottom: max(16px, env(safe-area-inset-bottom));
		border-radius: 22px 22px 0 0;
		background: var(--sr-mnav-panel-bg);
		box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
		transform: translateY(100%);
		visibility: hidden;
		transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.32s;
	}

	.sr-mnav-open .sr-mnav-overlay {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.3s ease;
	}

	.sr-mnav-open .sr-mnav-panel {
		transform: translateY(0);
		visibility: visible;
		transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.sr-mnav-open {
		overflow: hidden;
	}

	.sr-mnav-panel__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 18px 20px 14px;
		border-bottom: 1px solid var(--sr-mnav-border);
	}

	.sr-mnav-panel__title {
		color: #fff;
		font-family: "Baloo 2", system-ui, sans-serif;
		font-size: 20px;
		font-weight: 800;
	}

	.sr-mnav-panel__close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.1);
		color: #fff;
		cursor: pointer;
		transition: background 0.2s ease;
	}

	.sr-mnav-panel__close:hover {
		background: rgba(255, 255, 255, 0.2);
	}

	.sr-mnav-panel__close .sr-mnav__icon {
		width: 20px;
		height: 20px;
	}

	.sr-mnav-panel__links {
		margin: 0;
		padding: 8px 0;
		list-style: none;
	}

	.sr-mnav-panel__links li {
		margin: 0;
	}

	.sr-mnav-panel__links a {
		display: flex;
		align-items: center;
		gap: 16px;
		padding: 15px 22px;
		color: rgba(255, 255, 255, 0.88);
		font-family: Nunito, system-ui, sans-serif;
		font-size: 16px;
		font-weight: 700;
		text-decoration: none;
		transition: background 0.2s ease, color 0.2s ease;
	}

	.sr-mnav-panel__links a:hover,
	.sr-mnav-panel__links a:focus-visible {
		background: rgba(255, 255, 255, 0.06);
		color: var(--sr-mnav-active);
		outline: none;
	}

	.sr-mnav-panel__links .sr-mnav__icon {
		width: 22px;
		height: 22px;
		flex: none;
		color: var(--sr-mnav-active);
	}
}

/* Very narrow phones */
@media (max-width: 360px) {
	.sr-mnav__item > a,
	.sr-mnav__more {
		font-size: 10px;
	}

	.sr-mnav__bubble {
		width: 44px;
		height: 44px;
		margin-top: -22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sr-mnav-panel,
	.sr-mnav-overlay,
	.sr-mnav__bubble {
		transition: none !important;
	}
}
