/* iConnect Cijene — shortcode blokovi + popup izračun rata */

:root {
	--icc-accent: #1b64d9;
}

/* ---------- Zajedničko ---------- */

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

.icc-block {
	margin: 0 0 14px;
	color: #171717;
	font-size: 14px;
	line-height: 1.45;
}

/* Blok ubačen u odlomak — osiguravamo da se ponaša kao blok element. */
p > .icc-block {
	display: block;
}

/*
 * WPBakery text block nosi vlastiti margin-bottom (~35px). Gasimo ga samo kad
 * taj text block ne sadrži ništa osim našeg bloka, pa se ne dira ostatak stranice.
 */
.wpb_text_column:has(> .wpb_wrapper > .icc-block:only-child) {
	margin-bottom: 0;
}

/* ---------- [ic_cijena_kartica] ---------- */

.icc-card-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
}

.icc-card-price {
	color: #111;
	font-size: var(--icc-card-size, 24px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.icc-card-price .woocommerce-Price-amount,
.icc-card-price bdi {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.icc-rate-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	border-radius: 9px;
	background: var(--icc-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity .15s ease;
}

.icc-rate-btn:hover,
.icc-rate-btn:focus {
	background: var(--icc-accent);
	color: #fff;
	opacity: .88;
	text-decoration: none;
}

.icc-card-note {
	margin-top: 4px;
	color: #9a9a9a;
	font-size: 13px;
	line-height: 1.45;
}

.icc-card-note strong,
.icc-card-note b {
	color: #6f6f6f;
	font-weight: 700;
}

/* ---------- Bedž lijevo od cijene ---------- */

.icc-price-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 18px;
}

/* Napomena uvučena u kolonu stoji tik uz cijenu, bez naslijeđenih margina wrappera. */
.icc-price-col > .icc-block--cash {
	margin: 2px 0 0 !important;
}

.icc-price-col {
	min-width: 0;
	flex: 1 1 auto;
}

.icc-price-line {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.icc-price-line > .price,
.icc-price-line > p.price {
	margin: 0 !important;
}

.icc-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--icc-accent);
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

/* ---------- [ic_stock] ---------- */

.icc-stock {
	display: block;
}

.icc-price-line > .icc-stock {
	margin: 0 !important;
}

.icc-stock-pill {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 7px 15px 7px 13px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.icc-stock.is-in .icc-stock-pill {
	background: #e6f6ed;
	color: #0b6b39;
	box-shadow: inset 0 0 0 1px rgba(11, 107, 57, .14);
}

.icc-stock.is-back .icc-stock-pill {
	background: #fff4e2;
	color: #9a5b00;
	box-shadow: inset 0 0 0 1px rgba(154, 91, 0, .14);
}

.icc-stock.is-out .icc-stock-pill {
	background: #fdeceb;
	color: #b3261e;
	box-shadow: inset 0 0 0 1px rgba(179, 38, 30, .14);
}

.icc-stock-dot {
	position: relative;
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

/* Tihi puls samo kad je proizvod dostupan. */
.icc-stock.is-in .icc-stock-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: currentColor;
	animation: icc-pulse 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}

@keyframes icc-pulse {
	0% {
		transform: scale(1);
		opacity: .5;
	}

	70% {
		transform: scale(2.6);
		opacity: 0;
	}

	100% {
		transform: scale(2.6);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.icc-stock.is-in .icc-stock-dot::after {
		animation: none;
	}
}

/* ---------- [ic_cijena_gotovina] ---------- */

.icc-block--cash {
	display: block;
}

.icc-cash-note {
	min-width: 0;
	color: #9a9a9a;
	font-size: 14px;
	line-height: 1.45;
}

.icc-cash-note strong,
.icc-cash-note b {
	color: #171717;
	font-weight: 700;
}

@media (max-width: 575px) {
	.icc-card-row {
		gap: 12px;
	}

	.icc-card-price {
		font-size: calc(var(--icc-card-size, 24px) * 0.87);
	}

	.icc-rate-btn {
		padding: 10px 16px;
		font-size: 13px;
	}

	.icc-cash-note {
		font-size: 13px;
	}

	.icc-price-row {
		gap: 11px;
	}

	.icc-badge {
		flex-basis: 44px;
		width: 44px;
		height: 44px;
		font-size: 19px;
	}
}

/* ---------- Napomena u popisu proizvoda ---------- */

/*
 * Kartica proizvoda u temi zna biti flex/grid red, pa bi napomena sjela desno od cijene.
 * flex-basis i width je tjeraju u vlastiti redak bez obzira na duljinu cijene.
 */
.icc-loop-note {
	display: block;
	flex: 0 0 100%;
	width: 100%;
	grid-column: 1 / -1;
	margin: 1px 0 0;
	color: #8f8f8f;
	font-size: 12px;
	line-height: 1.4;
	text-align: inherit;
}

/* ---------- Popup ---------- */

body.icrp-open {
	overflow: hidden !important;
}

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

.icrp-overlay {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483000 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(20, 24, 30, .46);
	-webkit-backdrop-filter: blur(9px);
	backdrop-filter: blur(9px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .22s ease, visibility .22s ease;
}

.icrp-overlay.is-open {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

.icrp-modal {
	width: min(520px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .22);
	overscroll-behavior: contain;
	opacity: 0;
	transform: translateY(18px) scale(.985);
	transition: opacity .2s ease, transform .27s cubic-bezier(.2, .8, .2, 1);
}

.icrp-overlay.is-open .icrp-modal {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.icrp-header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 22px 22px 18px;
	border-bottom: 1px solid #ededed;
	background: rgba(255, 255, 255, .97);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.icrp-header h2 {
	margin: 0 !important;
	padding: 0 !important;
	color: #111 !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
}

.icrp-close {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 34px !important;
	height: 34px !important;
	flex: 0 0 34px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #f4f4f4 !important;
	color: #111 !important;
	font: inherit !important;
	font-size: 24px !important;
	font-weight: 300 !important;
	line-height: 1 !important;
	cursor: pointer;
	box-shadow: none !important;
}

.icrp-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	min-height: 62px;
	padding: 14px 22px;
	border-bottom: 1px solid #ededed;
}

.icrp-row:last-child {
	border-bottom: 0;
}

.icrp-main {
	min-width: 0;
}

.icrp-title {
	color: #171717;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
}

.icrp-meta {
	margin-top: 3px;
	color: #969696;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.25;
}

.icrp-value {
	color: #111;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	text-align: right;
}

@media (max-width: 600px) {
	.icrp-overlay {
		align-items: flex-end;
		padding: 8px;
	}

	.icrp-modal {
		width: 100%;
		max-height: 90vh;
		border-radius: 22px 22px 14px 14px;
	}

	.icrp-header {
		padding: 20px 18px 16px;
	}

	.icrp-row {
		gap: 14px;
		padding: 14px 18px;
	}
}

@media (max-width: 390px) {
	.icrp-row {
		padding-left: 15px;
		padding-right: 15px;
	}

	.icrp-title,
	.icrp-value {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.icrp-overlay,
	.icrp-modal {
		transition: none !important;
	}
}
