/**
 * IQ Mobile EuroExpress tracking — built from iqmobile.ba's own Material
 * Design 3 tokens, so the page inherits the shop's identity.
 *
 * MAGENTA IS THE BRAND COLOUR and carries the whole journey: completed steps,
 * the live step, every call to action and the delivered state are all magenta.
 * Steps are told apart by FILL vs OUTLINE, not by hue — the live step adds a
 * pulsing halo and a bold label. Green is deliberately NOT used as a brand
 * colour here. Amber and red remain reserved for genuine exceptions
 * (delay/attempted, returned/failed), where a distinct hue carries meaning.
 *
 * Neutrals are IQ's own: on-surface #27282C, on-surface-variant #6F6F6F,
 * surface-container #F6F6F6, outline-variant #E6E6E6, error #BA1A1A.
 * Font inherits from the theme (Inter). Mobile-first; bar goes horizontal at 600px.
 */

/* Tokens live on :root, NOT on .iqt-track — the order-list cards and the
   account-menu icon render outside the timeline wrapper and would otherwise
   resolve every var() to nothing. */
:root {
	/* The brand. Used for done steps, the live step, CTAs and delivered. */
	--iqt-brand: #E7008B;
	--iqt-brand-deep: #B3006E;   /* IQ's own primary-hover — text/contrast use */
	/* Aliases kept so every rule below reads consistently. */
	--iqt-current: var(--iqt-brand);
	--iqt-done: var(--iqt-brand);
	--iqt-done-text: var(--iqt-brand-deep);
	--iqt-magenta: var(--iqt-brand);
	--iqt-blue: var(--iqt-brand);
	--iqt-green: var(--iqt-brand);
	--iqt-dark: #27282C;
	--iqt-muted: #6F6F6F;
	--iqt-bg: #F6F6F6;
	--iqt-warn: #f5a623;
	--iqt-error: #BA1A1A;
	--iqt-radius: 10px;
}

.iqt-track {
	max-width: 720px;
	margin: 0 auto;
	color: var(--iqt-dark);
}

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

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

/* ---- Progress bar ---------------------------------------------------- */
.iqt-bar {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.iqt-bar__step {
	display: flex;
	align-items: center;
	gap: .75rem;
	position: relative;
	padding: 0 0 1.4rem 0;
}
.iqt-bar__step:last-child { padding-bottom: 0; }
/* connector line */
.iqt-bar__step:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 13px;
	top: 28px;
	bottom: 2px;
	width: 2px;
	background: #E6E6E6;
}
.iqt-bar__step--done:not(:last-child)::before { background: var(--iqt-blue); }
.iqt-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 #E6E6E6;
	color: #fff;
	z-index: 1;
}
.iqt-bar__step--done .iqt-bar__dot    { background: var(--iqt-blue); border-color: var(--iqt-blue); }
.iqt-bar__dot svg {
	display: block;
	width: 14px;
	height: 14px;
	color: #fff;
}
/* Live step: same brand fill as the completed ones, set apart by a white
   inset ring plus the breathing halo — hue stays on-brand, state still reads. */
.iqt-bar__step--current .iqt-bar__dot {
	border-color: var(--iqt-brand);
	background: var(--iqt-brand);
	box-shadow: inset 0 0 0 2.5px #fff, 0 0 0 4px rgba(231, 0, 139, .18);
	animation: iqt-pulse 2s ease-in-out infinite;
}
.iqt-bar__step--current:not(:last-child)::before {
	background: linear-gradient(
		to bottom,
		var(--iqt-done) 0,
		var(--iqt-done) 50%,
		#E6E6E6 50%,
		#E6E6E6 100%
	);
}
@keyframes iqt-pulse {
	0%, 100% { box-shadow: inset 0 0 0 2.5px #fff, 0 0 0 4px rgba(231, 0, 139, .18); }
	50%      { box-shadow: inset 0 0 0 2.5px #fff, 0 0 0 8px rgba(231, 0, 139, .06); }
}
.iqt-bar__label { font-size: .95rem; color: var(--iqt-muted); }
.iqt-bar__step--done .iqt-bar__label    { color: var(--iqt-dark); }
.iqt-bar__step--current .iqt-bar__label { color: var(--iqt-dark); font-weight: 700; }
.iqt-bar--cancelled .iqt-bar__step:not(:last-child)::before { background: #d6d6d6; }
.iqt-bar__step--cancelled .iqt-bar__dot {
	background: #F6F6F6;
	border-color: #B9B9B9;
	color: #6F6F6F;
}
.iqt-bar__step--cancelled .iqt-bar__dot svg { color: #6F6F6F; }
.iqt-bar__step--cancelled .iqt-bar__label {
	color: #6F6F6F;
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
}

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

/* ---- COD box ---------------------------------------------------------- */
.iqt-cod {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	background: var(--iqt-bg);
	border-left: 4px solid var(--iqt-magenta);
	border-radius: var(--iqt-radius);
	padding: .9rem 1rem;
	margin: 0 0 1.5rem;
}
.iqt-cod--paid { border-left-color: var(--iqt-done); }
.iqt-cod--pending { border-left-color: var(--iqt-warn); }
/* Both COD icons are inline SVG (no emoji): consistent weight across every
   platform, and they inherit the semantic colour of their state. */
.iqt-cod__icon {
	width: 1.75rem;
	height: 1.75rem;
	flex: 0 0 1.75rem;
	margin-top: -.1rem;
	line-height: 1;
}
.iqt-cod__icon svg { display: block; width: 100%; height: 100%; }
.iqt-cod__icon--cash    { color: var(--iqt-current); }
.iqt-cod__icon--paid    { color: var(--iqt-brand); }
.iqt-cod__icon--pending { color: var(--iqt-warn); }
.iqt-cod p { margin: .15rem 0 0; font-size: .95rem; color: #27282C; }

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

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

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

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

/* ---- Order list (account endpoint index) ------------------------------- */
.iqt-order-list { display: grid; gap: .75rem; }
.iqt-order-card {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .15rem .75rem;
	padding: .9rem 1rem;
	border: 1px solid #E6E6E6;
	border-radius: var(--iqt-radius);
	text-decoration: none;
	color: var(--iqt-dark);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.iqt-order-card:hover { border-color: var(--iqt-magenta); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.iqt-order-card__num    { font-weight: 700; }
.iqt-order-card__date   { color: var(--iqt-muted); font-size: .85rem; text-align: right; }
.iqt-order-card__status { font-size: .92rem; color: #27282C; }
.iqt-order-card__status.iqt-state-20 { color: var(--iqt-done-text); font-weight: 600; }
.iqt-order-card__status.iqt-state-14 { color: var(--iqt-magenta); font-weight: 600; }
.iqt-order-card__cta    { color: var(--iqt-current); font-size: .88rem; text-align: right; }
.iqt-order-card--cancelled .iqt-order-card__status { color: var(--iqt-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 ------------------------------------------------------ */
.iqt-guest-wrap { padding: 2rem 1rem 3rem; }
.iqt-guest-inner { max-width: 760px; margin: 0 auto; }

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