/**
 * 198hr.shop - legal 2026 — front-end styles.
 *
 * Colors and font sizes from the settings are added as inline CSS.
 */

.hr198shopcijene-lowest,
.hr198shopcijene-anchor {
	display: block;
	margin-top: 0.3em;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	white-space: normal;
}

.hr198shopcijene-lowest .hr198shopcijene-amount,
.hr198shopcijene-anchor .hr198shopcijene-amount {
	font-weight: 600;
	white-space: nowrap;
}

/* Keep the legal texts plain even inside <ins>/<del> price markup. */
.price .hr198shopcijene-lowest,
.price .hr198shopcijene-anchor {
	text-decoration: none;
	background: none;
}

.hr198shopcijene-variation-target:empty {
	display: none;
}

.hr198shopcijene-graph-open {
	white-space: nowrap;
}

/* Price history graph */
.hr198shopcijene-graph-wrap {
	margin: 1em 0;
}

.hr198shopcijene-graph {
	position: relative;
	width: 100%;
	max-width: 760px;
	min-height: 120px;
	font-size: 12px;
}

.hr198shopcijene-graph svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.hr198shopcijene-graph .hr198-grid {
	stroke: currentColor;
	stroke-opacity: 0.15;
	stroke-width: 1;
}

.hr198shopcijene-graph .hr198-label {
	fill: currentColor;
	fill-opacity: 0.7;
	font-size: 11px;
}

.hr198shopcijene-graph .hr198-line {
	fill: none;
	stroke-width: 2.5;
	stroke-linejoin: round;
}

.hr198shopcijene-graph .hr198-area {
	fill-opacity: 0.08;
	stroke: none;
}

.hr198shopcijene-graph .hr198-point {
	stroke: #fff;
	stroke-width: 1.5;
}

.hr198shopcijene-graph-empty,
.hr198shopcijene-graph-hint {
	opacity: 0.75;
	font-style: italic;
}

/* Modal */
.hr198shopcijene-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.55);
}

.hr198shopcijene-modal[hidden] {
	display: none;
}

.hr198shopcijene-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 760px;
	max-height: 90vh;
	overflow: auto;
	padding: 24px;
	border-radius: 6px;
	background: #fff;
	color: #1e1e1e;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hr198shopcijene-modal__title {
	margin: 0 0 12px;
	font-size: 1.25em;
}

.hr198shopcijene-modal__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

body.hr198shopcijene-modal-open {
	overflow: hidden;
}

/* Public price list ([198hrshopcijene_cjenik]) */
.hr198shopcijene-pricelist__archive {
	width: 100%;
	border-collapse: collapse;
}

.hr198shopcijene-pricelist__archive th,
.hr198shopcijene-pricelist__archive td {
	padding: 6px 8px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	text-align: left;
}

.hr198shopcijene-pricelist__object,
.hr198shopcijene-pricelist__note {
	opacity: 0.8;
	font-size: 0.9em;
}

/* Cart item data */
.woocommerce-cart-form .variation .hr198shopcijene-amount,
.wc-block-components-product-details .hr198shopcijene-amount {
	font-weight: 600;
}

/*
 * Price lists entered in the admin: [198hrshopcijene_cjenik id="…"].
 * Colours come from the price list settings (CSS custom properties).
 */
.hr198-cjenik {
	--hr198-accent: #333333;
	--hr198-header-text: #ffffff;
	margin: 0 0 1.5em;
}

.hr198-cjenik__title {
	margin: 0 0 0.75em;
}

/* Item names with a link (the "Link" field of the item). */
.hr198-cjenik a.hr198-cjenik__link,
.hr198-cjenik a.hr198-cjenik__link:visited {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	text-decoration-color: currentColor;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.hr198-cjenik a.hr198-cjenik__link:hover,
.hr198-cjenik a.hr198-cjenik__link:focus-visible {
	text-decoration-color: currentColor;
}

.hr198-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hr198-amount {
	white-space: nowrap;
}

.hr198-legal {
	display: block;
	font-size: var(--hr198-legal-size, 0.8em);
	font-weight: 400;
	line-height: 1.4;
	color: var(--hr198-legal-color, inherit);
	white-space: normal;
}

/* Menu template */
.hr198-menu {
	display: grid;
	gap: 1.6em;
}

.hr198-cjenik--cols-2 .hr198-menu {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 3em;
}

.hr198-menu__group {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25em;
	align-items: center;
}

.hr198-menu__group.has-image {
	grid-template-columns: 100px minmax(0, 1fr);
}

.hr198-menu__image img {
	display: block;
	width: 100px;
	max-width: 100%;
	height: 100px;
	object-fit: cover;
}

.hr198-cjenik--img-round .hr198-menu__image img {
	border-radius: 50%;
}

.hr198-cjenik--img-square .hr198-menu__image img {
	border-radius: 6px;
}

.hr198-menu__body {
	min-width: 0;
}

.hr198-menu__item + .hr198-menu__item {
	margin-top: 0.25em;
}

.hr198-menu__line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.75em;
	font-size: 1.25em;
	font-weight: 600;
	line-height: 1.3;
}

.hr198-menu__name {
	flex: 0 1 auto;
	min-width: 45%;
	overflow-wrap: break-word;
}

.hr198-menu__dots {
	flex: 1 1 2em;
	min-width: 1.5em;
	border-bottom: 1px dotted currentColor;
	opacity: 0.6;
	transform: translateY(-0.3em);
}

.hr198-menu__price {
	flex: none;
	margin-left: auto;
	text-align: right;
	white-space: nowrap;
}

.hr198-menu__price del,
.hr198-table__price del {
	margin-right: 0.25em;
	font-weight: 400;
	opacity: 0.6;
}

.hr198-menu__price ins,
.hr198-table__price ins {
	background: none;
	text-decoration: none;
}

.hr198-menu__legal {
	margin-top: 0.15em;
	text-align: right;
}

.hr198-menu__desc {
	margin: 0.5em 0 0;
	line-height: 1.6;
	opacity: 0.75;
}

/* Table template */
.hr198-table-wrap {
	max-width: 100%;
	overflow-x: auto;
}

.hr198-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border: 0;
}

.hr198-table thead th {
	padding: 0.9em 1.25em;
	border: 0;
	background: var(--hr198-accent);
	color: var(--hr198-header-text);
	font-weight: 600;
	text-align: left;
}

.hr198-table td {
	padding: 0.95em 1.25em;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	background: transparent;
	vertical-align: top;
}

.hr198-table tbody tr:nth-child(even) td {
	background: rgba(0, 0, 0, 0.03);
}

.hr198-table th.hr198-table__price,
.hr198-table td.hr198-table__price {
	width: 1%;
	text-align: right;
	white-space: nowrap;
}

.hr198-table td.hr198-table__price .hr198-legal {
	white-space: nowrap;
}

.hr198-table tr.is-linked td.hr198-table__name {
	padding-left: 2.25em;
}

.hr198-table__desc {
	display: block;
	margin-top: 0.2em;
	font-size: 0.85em;
	opacity: 0.75;
}

.hr198-stavka .hr198-legal {
	margin-top: 0.2em;
}

@media (max-width: 782px) {
	.hr198-cjenik--cols-2 .hr198-menu {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 480px) {
	.hr198-menu__group.has-image {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 0.9em;
	}

	.hr198-menu__image img {
		width: 64px;
		height: 64px;
	}

	.hr198-menu__line {
		font-size: 1.1em;
	}

	.hr198-table td,
	.hr198-table thead th {
		padding: 0.75em 0.8em;
	}

	.hr198-table th.hr198-table__price,
	.hr198-table td.hr198-table__price,
	.hr198-table td.hr198-table__price .hr198-legal,
	.hr198-table td.hr198-table__price .hr198-amount {
		white-space: normal;
	}

	.hr198-table td.hr198-table__price {
		width: 40%;
	}
}
