/* Cjenik Upload – frontend */

.cjenik-wrap {
	margin: 1.5em 0;
}

.cjenik-intro {
	margin-bottom: 1em;
}

.cjenik-heading {
	margin: 1.5em 0 0.5em;
}

.cjenik-button {
	display: inline-block;
	padding: 0.65em 1.4em;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background: #1e73be;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.cjenik-button:hover,
.cjenik-button:focus {
	background: #155a94;
	color: #fff;
}

.cjenik-button:focus-visible {
	outline: 2px solid #155a94;
	outline-offset: 2px;
}

.cjenik-panel {
	margin-top: 1em;
}

.cjenik-panel[hidden],
.cjenik-no-results[hidden],
.cjenik-table tbody tr[hidden] {
	display: none;
}

.cjenik-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4em 1.25em;
	margin-bottom: 0.5em;
}

.cjenik-meta-title {
	font-weight: 700;
	font-size: 1.1em;
}

.cjenik-meta-date {
	opacity: 0.75;
}

.cjenik-download {
	margin-left: auto;
	font-size: 0.9em;
	white-space: nowrap;
}

.cjenik-note {
	margin: 0 0 0.75em;
	font-size: 0.95em;
	opacity: 0.85;
}

.cjenik-search-wrap {
	margin-bottom: 0.75em;
}

.cjenik-search {
	width: 100%;
	max-width: 360px;
	padding: 0.5em 0.75em;
	font: inherit;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
}

.cjenik-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.cjenik-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.cjenik-table th,
.cjenik-table td {
	padding: 0.55em 0.75em;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #e3e3e3;
}

.cjenik-table thead th {
	position: sticky;
	top: 0;
	background: #f4f4f4;
	font-weight: 700;
	border-bottom: 2px solid #d0d0d0;
}

.cjenik-table tbody tr:nth-child(even) {
	background: #fafafa;
}

.cjenik-table tbody tr:hover {
	background: #f0f6fc;
}

/* Brojčani stupci desno poravnati (cijene) – zadnji stupac. */
.cjenik-table td:last-child,
.cjenik-table th:last-child {
	text-align: right;
	white-space: nowrap;
}

.cjenik-empty,
.cjenik-loading,
.cjenik-no-results {
	font-style: italic;
	opacity: 0.8;
}

/* Poveznice [cjenik_link] i [cjenik_preuzmi] */
a.cjenik-link.cjenik-button {
	text-decoration: none;
}

.cjenik-link-missing {
	font-size: 0.85em;
	color: #b32d2e;
}

/* Više prodajnih mjesta: svako ima svoj blok */
.cjenik-location + .cjenik-location {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 1px solid #e3e3e3;
}

/* Napomena o brisanju starih cjenika i rok dostupnosti uz svaki stari cjenik */
.cjenik-arhiva-note {
	margin: 0 0 1em;
	font-size: 0.9em;
	opacity: 0.85;
}

.cjenik-file-expires {
	font-size: 0.75em;
	opacity: 0.75;
	white-space: nowrap;
}

/* Arhiva: datumi jedan ispod drugoga, ispod svakog njegov cjenik */
.cjenik-arhiva {
	margin-top: 2em;
}

.cjenik-arhiva-day {
	margin: 0 0 1.5em;
}

.cjenik-arhiva-day-title {
	margin: 0 0 0.5em;
	font-size: 1em;
	font-weight: 700;
}

.cjenik-files {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cjenik-file {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #e3e3e3;
}

.cjenik-file-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1em;
	padding: 0.7em 0;
}

.cjenik-file-name {
	flex: 1 1 auto;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	font-size: 0.95em;
}

.cjenik-file-format,
.cjenik-file-badge {
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 0.15em 0.5em;
	border-radius: 3px;
	background: #e9eef4;
	color: #444;
}

.cjenik-file-badge {
	background: #1e73be;
	color: #fff;
}

.cjenik-file-note {
	margin: -0.3em 0 0.7em;
	font-size: 0.85em;
	color: #666;
}

.cjenik-file-actions {
	display: inline-flex;
	align-items: center;
	gap: 1em;
	white-space: nowrap;
}

.cjenik-file-preview {
	padding: 0;
	font: inherit;
	font-size: 0.9em;
	color: #1e73be;
	background: none;
	border: 0;
	cursor: pointer;
	text-decoration: underline;
}

.cjenik-file-download {
	margin-left: 0;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.85em;
	color: #1e73be;
	text-decoration: none;
}

.cjenik-file-download::before {
	content: '\2913';
	margin-right: 0.35em;
}

.cjenik-file-download:hover {
	text-decoration: underline;
}

.cjenik-file .cjenik-panel {
	margin: 0 0 1em;
}

/* Mobilni prikaz: tablica kao kartice */
@media (max-width: 600px) {
	.cjenik-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.cjenik-table,
	.cjenik-table tbody,
	.cjenik-table tr,
	.cjenik-table td {
		display: block;
		width: 100%;
	}

	.cjenik-table tr {
		margin-bottom: 0.75em;
		border: 1px solid #e3e3e3;
		border-radius: 4px;
	}

	.cjenik-table td,
	.cjenik-table td:last-child {
		display: flex;
		justify-content: space-between;
		gap: 1em;
		text-align: right;
		white-space: normal;
		border-bottom: 1px solid #f0f0f0;
	}

	.cjenik-table td::before {
		content: attr(data-label);
		font-weight: 600;
		text-align: left;
	}

	.cjenik-download {
		margin-left: 0;
	}
}
