/**
 * Bimaco EuroExpress tracking — matches bimaco.net (Shoptimizer) design tokens:
 * magenta #EC008C (CTA), blue #00AEEF (accent), green #27AE60 (positive),
 * dark #1a1a1a, light bg #f8f9fa, muted #8b8b8b. Fonts inherit (Aller/Inter).
 * Mobile-first; the bar flips horizontal at 600px.
 */

.bet-track {
	--bet-magenta: #EC008C;
	--bet-blue: #00AEEF;
	--bet-green: #27AE60;
	--bet-dark: #1a1a1a;
	--bet-muted: #8b8b8b;
	--bet-bg: #f8f9fa;
	--bet-warn: #f5a623;
	--bet-error: #cf2e2e;
	--bet-radius: 10px;
	max-width: 720px;
	margin: 0 auto;
	color: var(--bet-dark);
}

/* ---- Header --------------------------------------------------------- */
.bet-track__order {
	color: var(--bet-muted);
	font-size: .85rem;
	margin: 0 0 .35rem;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.bet-track__headline {
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.2;
	margin: 0 0 .4rem;
	font-weight: 700;
}
.bet-track[data-state="delivered"] .bet-track__headline { color: var(--bet-green); }
.bet-track[data-state="cancelled"] .bet-track__headline { color: var(--bet-error); }
.bet-track__sub { color: #444; margin: 0 0 1.25rem; font-size: 1rem; }

/* ---- Exception banners ---------------------------------------------- */
.bet-banner {
	display: flex;
	gap: .6rem;
	align-items: flex-start;
	border-radius: var(--bet-radius);
	padding: .85rem 1rem;
	margin: 0 0 1.25rem;
	font-size: .95rem;
}
.bet-banner--warn  { background: #fff7e8; border: 1px solid var(--bet-warn); }
.bet-banner--error { background: #fdeeee; border: 1px solid var(--bet-error); }
.bet-banner__icon  { flex: 0 0 auto; font-size: 1.1rem; line-height: 1.3; }

/* ---- Progress bar ---------------------------------------------------- */
.bet-bar {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.bet-bar__step {
	display: flex;
	align-items: center;
	gap: .75rem;
	position: relative;
	padding: 0 0 1.4rem 0;
}
.bet-bar__step:last-child { padding-bottom: 0; }
/* connector line */
.bet-bar__step:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 13px;
	top: 28px;
	bottom: 2px;
	width: 2px;
	background: #e2e2e2;
}
.bet-bar__step--done:not(:last-child)::before { background: var(--bet-blue); }
.bet-bar__dot {
	flex: 0 0 28px;
	width: 28px; height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: .8rem;
	font-weight: 700;
	background: #fff;
	border: 2px solid #e2e2e2;
	color: #fff;
	z-index: 1;
}
.bet-bar__step--done .bet-bar__dot    { background: var(--bet-blue); border-color: var(--bet-blue); }
.bet-bar__dot svg {
	display: block;
	width: 14px;
	height: 14px;
	color: #fff;
}
.bet-bar__step--current .bet-bar__dot {
	border-color: var(--bet-blue);
	background: var(--bet-blue);
	box-shadow: 0 0 0 4px rgba(0, 174, 239, .15);
	animation: bet-pulse 2s ease-in-out infinite;
}
.bet-bar__step--current:not(:last-child)::before {
	background: linear-gradient(
		to bottom,
		var(--bet-blue) 0,
		var(--bet-blue) 50%,
		#e2e2e2 50%,
		#e2e2e2 100%
	);
}
@keyframes bet-pulse {
	0%, 100% { box-shadow: 0 0 0 4px rgba(0, 174, 239, .15); }
	50%      { box-shadow: 0 0 0 7px rgba(0, 174, 239, .07); }
}
.bet-bar__label { font-size: .95rem; color: var(--bet-muted); }
.bet-bar__step--done .bet-bar__label    { color: var(--bet-dark); }
.bet-bar__step--current .bet-bar__label { color: var(--bet-dark); font-weight: 700; }
.bet-bar--cancelled .bet-bar__step:not(:last-child)::before { background: #d6d6d6; }
.bet-bar__step--cancelled .bet-bar__dot {
	background: #f6f6f6;
	border-color: #b8b8b8;
	color: #767676;
}
.bet-bar__step--cancelled .bet-bar__dot svg { color: #767676; }
.bet-bar__step--cancelled .bet-bar__label {
	color: #767676;
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
}

/* horizontal on wider screens */
@media (min-width: 600px) {
	.bet-bar { flex-direction: row; justify-content: space-between; }
	.bet-bar__step { flex-direction: column; text-align: center; flex: 1; padding: 0; gap: .5rem; }
	.bet-bar__step:not(:last-child)::before {
		left: calc(50% + 20px);
		right: calc(-50% + 20px);
		top: 13px;
		bottom: auto;
		width: auto;
		height: 2px;
	}
	.bet-bar__step--current:not(:last-child)::before {
		background: linear-gradient(
			to right,
			var(--bet-blue) 0,
			var(--bet-blue) 50%,
			#e2e2e2 50%,
			#e2e2e2 100%
		);
	}
	.bet-bar__label { font-size: .82rem; max-width: 110px; }
}

/* ---- COD box ---------------------------------------------------------- */
.bet-cod {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	background: var(--bet-bg);
	border-left: 4px solid var(--bet-magenta);
	border-radius: var(--bet-radius);
	padding: .9rem 1rem;
	margin: 0 0 1.5rem;
}
.bet-cod--paid { border-left-color: var(--bet-green); }
.bet-cod__icon { font-size: 1.25rem; line-height: 1.2; }
.bet-cod__icon--paid {
	width: 1.75rem;
	height: 1.75rem;
	color: var(--bet-green);
	flex: 0 0 1.75rem;
	margin-top: -.1rem;
}
.bet-cod__icon--paid svg { display: block; width: 100%; height: 100%; }
.bet-cod p { margin: .15rem 0 0; font-size: .95rem; color: #444; }

/* ---- Items ------------------------------------------------------------ */
.bet-items h3, .bet-shipment h3, .bet-help h3 { font-size: 1.05rem; margin: 0 0 .6rem; }
.bet-items ul { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.bet-items li {
	display: flex;
	align-items: center;
	gap: .7rem;
	padding: .5rem 0;
	border-bottom: 1px solid #ececec;
	font-size: .95rem;
}
.bet-items li img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.bet-items__name { flex: 1; }
.bet-items__qty  { color: var(--bet-muted); }
.bet-items--cancelled li { color: #767676; }
.bet-items--cancelled .bet-items__name { text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* ---- Shipment / carrier / history ------------------------------------- */
.bet-shipment { margin: 0 0 1.25rem; }
.bet-shipment__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1rem;
	justify-content: space-between;
	align-items: baseline;
	font-size: .9rem;
	color: #444;
	margin-bottom: .6rem;
}
.bet-shipment__carrier { color: var(--bet-blue); text-decoration: none; font-size: .88rem; }
.bet-shipment__carrier:hover { text-decoration: underline; }

.bet-history {
	background: var(--bet-bg);
	border-radius: var(--bet-radius);
	padding: .35rem .9rem;
}
.bet-history summary {
	cursor: pointer;
	font-weight: 600;
	padding: .5rem 0;
	font-size: .95rem;
}
.bet-history__list { list-style: none; margin: .25rem 0 .75rem; padding: 0; }
.bet-history__list li {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: .15rem .75rem;
	padding: .45rem 0;
	border-top: 1px solid #e7e7e7;
	font-size: .88rem;
}
.bet-history__list time { color: var(--bet-muted); white-space: nowrap; }
.bet-history__place { grid-column: 2; color: var(--bet-muted); font-size: .82rem; }
.bet-history__desc  { grid-column: 2; }
.bet-history__list li time { grid-row: span 2; }

/* ---- Pending / help ---------------------------------------------------- */
.bet-track__pending {
	background: var(--bet-bg);
	border-radius: var(--bet-radius);
	padding: 1rem;
	color: #444;
}
.bet-help {
	margin-top: 1.75rem;
	padding-top: 1rem;
	border-top: 1px solid #ececec;
	font-size: .95rem;
}
.bet-help a { color: var(--bet-magenta); font-weight: 600; text-decoration: none; }
.bet-help a:hover { text-decoration: underline; }
.bet-help__trust { color: var(--bet-muted); font-size: .8rem; margin-top: .5rem; }

/* ---- Order list (account endpoint index) ------------------------------- */
.bet-order-list { display: grid; gap: .75rem; }
.bet-order-card {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .15rem .75rem;
	padding: .9rem 1rem;
	border: 1px solid #e2e2e2;
	border-radius: var(--bet-radius);
	text-decoration: none;
	color: var(--bet-dark);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.bet-order-card:hover { border-color: var(--bet-magenta); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.bet-order-card__num    { font-weight: 700; }
.bet-order-card__date   { color: var(--bet-muted); font-size: .85rem; text-align: right; }
.bet-order-card__status { font-size: .92rem; color: #444; }
.bet-order-card__status.bet-state-20 { color: var(--bet-green); font-weight: 600; }
.bet-order-card__status.bet-state-14 { color: var(--bet-magenta); font-weight: 600; }
.bet-order-card__cta    { color: var(--bet-blue); font-size: .88rem; text-align: right; }
.bet-order-card--cancelled .bet-order-card__status { color: var(--bet-error); font-weight: 600; }

/* ---- Moj račun menu icon (matches Shoptimizer's mask-image pattern) ----- */
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--pracenje-posiljke a:before {
	-webkit-mask-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 16V6C13 5.44772 12.5523 5 12 5H4C3.44772 5 3 5.44772 3 6V16C3 16.5523 3.44772 17 4 17H5M13 16C13 16.5523 12.5523 17 12 17H9M13 16V8C13 7.44772 13.4477 7 14 7H16.5858C16.851 7 17.1054 7.10536 17.2929 7.29289L20.7071 10.7071C20.8946 10.8946 21 11.149 21 11.4142V16C21 16.5523 20.5523 17 20 17H19M13 16C13 16.5523 13.4477 17 14 17H15M5 17C5 18.1046 5.89543 19 7 19C8.10457 19 9 18.1046 9 17M5 17C5 15.8954 5.89543 15 7 15C8.10457 15 9 15.8954 9 17M15 17C15 18.1046 15.8954 19 17 19C18.1046 19 19 18.1046 19 17M15 17C15 15.8954 15.8954 15 17 15C18.1046 15 19 15.8954 19 17' stroke='%234A5568' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	        mask-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 16V6C13 5.44772 12.5523 5 12 5H4C3.44772 5 3 5.44772 3 6V16C3 16.5523 3.44772 17 4 17H5M13 16C13 16.5523 12.5523 17 12 17H9M13 16V8C13 7.44772 13.4477 7 14 7H16.5858C16.851 7 17.1054 7.10536 17.2929 7.29289L20.7071 10.7071C20.8946 10.8946 21 11.149 21 11.4142V16C21 16.5523 20.5523 17 20 17H19M13 16C13 16.5523 13.4477 17 14 17H15M5 17C5 18.1046 5.89543 19 7 19C8.10457 19 9 18.1046 9 17M5 17C5 15.8954 5.89543 15 7 15C8.10457 15 9 15.8954 9 17M15 17C15 18.1046 15.8954 19 17 19C18.1046 19 19 18.1046 19 17M15 17C15 15.8954 15.8954 15 17 15C18.1046 15 19 15.8954 19 17' stroke='%234A5568' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---- Guest wrapper ------------------------------------------------------ */
.bet-guest-wrap { padding: 2rem 1rem 3rem; }
.bet-guest-inner { max-width: 760px; margin: 0 auto; }

/* ---- Embedded in view-order --------------------------------------------- */
.bet-embed { margin-top: 2rem; }
.bet-embed h2 { font-size: 1.35rem; margin-bottom: 1rem; }
