/* =========================================================
   ADEA LAB — TABLEPRESS CENOVNIK ANALIZA (accordion)
   Tabela: #tablepress-1

   column-1 = Kategorija
   column-2 = Podkategorija
   column-3 = Analiza
   column-4 = Alternativni naziv
   column-5 = Ključne reči
   column-6 = Cena

   Breakpointi prate Divi: tablet do 980px, telefon do 767px.
   ========================================================= */
/* ---------------------------------------------------------
   1. VARIJABLE
   --------------------------------------------------------- */
#tablepress-1_wrapper,
#tablepress-1,
#adealab-calc {
	--adea-red: #b5121b;
	--adea-red-hover: #8f0e16;
	--adea-turquoise: #17afa9;
	--adea-turquoise-dark: #128f8a;
	--adea-aqua: #e8f7f6;
	--adea-aqua-soft: #f7fbfa;
	--adea-heading: #231f20;
	--adea-text: #4b5155;
	--adea-muted: #6b7276;
	--adea-border: #d9dde0;
	--adea-white: #ffffff;
	--adea-font-body: "DM Sans", sans-serif;
	--adea-font-heading: "Plus Jakarta Sans", sans-serif;
}

/* ---------------------------------------------------------
   2. OSNOVA
   --------------------------------------------------------- */
#tablepress-1_wrapper,
#tablepress-1_wrapper *,
#tablepress-1,
#tablepress-1 * {
	box-sizing: border-box;
}

#tablepress-1_wrapper {
	width: 100%;
	max-width: 100%;
	margin-top: 40px;
	font-family: var(--adea-font-body);
	color: var(--adea-text);
}

#tablepress-1 {
	width: 100% !important;
	max-width: 100%;
	margin: 0 !important;
	border: 1px solid var(--adea-border);
	border-collapse: separate;
	border-spacing: 0;
	background: var(--adea-white);
	box-shadow: 0 10px 35px rgba(35,31,32,.055);
	font-family: var(--adea-font-body);
	font-size: 16px;
	line-height: 1.55;
}

/* TablePress (opcija "row hover") stavlja content-visibility: auto na redove.
   Na telefonu su redovi blokovi, pa novi naslovi dok se ne iscrtaju imaju 0px
   visine — automatski skrol bi tada promašio poziciju. */
#tablepress-1 tbody tr {
	content-visibility: visible;
}

/* ---------------------------------------------------------
   3. KOLONE
   --------------------------------------------------------- */
#tablepress-1 .column-6 {
	width: 150px;
	text-align: right;
}

@media (min-width: 768px) {
	#tablepress-1 .column-3,
	#tablepress-1 .column-6 {
		display: table-cell !important;
	}
}

@media (max-width: 980px) {
	#tablepress-1 .column-6 {
		width: 130px;
	}
}

/* ---------------------------------------------------------
   4. ZAGLAVLJE (Analiza / Cena) — bez pozadine i bordera
   --------------------------------------------------------- */
#tablepress-1 thead th {
	padding: 18px 20px;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--adea-heading);
	font-family: var(--adea-font-heading);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: .01em;
	text-align: left;
	vertical-align: middle;
}

#tablepress-1 thead .column-6 {
	text-align: right;
}

/* ---------------------------------------------------------
   5. REDOVI ANALIZA
   --------------------------------------------------------- */
#tablepress-1 tbody td {
	padding: 18px 20px;
	border: 0;
	border-bottom: 1px solid var(--adea-border);
	background: var(--adea-white);
	color: var(--adea-text);
	font-size: 15px;
	line-height: 1.55;
	vertical-align: middle;
	transition: background-color 180ms ease, color 180ms ease;
}

/* Naziv analize */
#tablepress-1 tbody tr.adealab-analysis-row .column-3 {
	padding-left: 44px;
	color: var(--adea-text);
	font-family: var(--adea-font-body);
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.5;
	text-align: left;
}

/* Cena */
#tablepress-1 tbody tr.adealab-analysis-row .column-6 {
	color: var(--adea-red);
	font-size: 14px !important;
	font-weight: 600 !important;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	text-align: right;
}

#tablepress-1 tbody .column-6 a {
	color: var(--adea-red);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#tablepress-1 tbody .column-6 a:hover {
	color: var(--adea-red-hover);
}

@media (hover: hover) {
	#tablepress-1 tbody tr.adealab-analysis-row:hover td {
		background: var(--adea-aqua-soft);
	}
}

/* ---------------------------------------------------------
   6. NASLOVI GRUPA — zajedničko
   --------------------------------------------------------- */
#tablepress-1 .adealab-group-title {
	display: inline;
}

#tablepress-1 .adealab-toggle-hint {
	display: inline;
	margin-left: 8px;
	font-family: var(--adea-font-body);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

/* ---------------------------------------------------------
   7. KATEGORIJA — statična, bez accordiona
   --------------------------------------------------------- */
#tablepress-1 tbody tr.adealab-category-row td {
	display: table-cell !important;
	width: auto !important;
	padding: 19px 20px !important;
	border: 0 !important;
	background: var(--adea-red) !important;
	color: var(--adea-white) !important;
	font-family: var(--adea-font-heading);
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.35;
	letter-spacing: .035em;
	text-align: left !important;
	text-transform: uppercase;
}

/* Bez +/− i bez "prikaži analize" */
#tablepress-1 tbody tr.adealab-category-row td::after {
	content: none !important;
}

#tablepress-1 tbody tr.adealab-category-row .adealab-toggle-hint {
	display: none !important;
}

/* ---------------------------------------------------------
   8. PODKATEGORIJA — accordion
   --------------------------------------------------------- */
#tablepress-1 tbody tr.adealab-subcategory-row {
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

/* Zatvoreno */
#tablepress-1 tbody tr.adealab-subcategory-row td {
	position: relative;
	display: table-cell !important;
	width: auto !important;
	padding: 16px 48px 16px 32px !important;
	border: 0 !important;
	border-bottom: 1px solid var(--adea-border) !important;
	background: var(--adea-white) !important;
	color: var(--adea-heading) !important;
	font-family: var(--adea-font-heading);
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.4;
	letter-spacing: .005em;
	text-align: left !important;
}

#tablepress-1 tbody tr.adealab-subcategory-row .adealab-toggle-hint {
	color: var(--adea-muted);
}

#tablepress-1 tbody tr.adealab-subcategory-row td::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 20px;
	color: var(--adea-heading);
	font-family: var(--adea-font-heading);
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-50%);
}

/* Otvoreno */
#tablepress-1 tbody tr.adealab-subcategory-row.is-open td {
	border-bottom-color: var(--adea-turquoise) !important;
	background: var(--adea-turquoise) !important;
	color: var(--adea-white) !important;
}

#tablepress-1 tbody tr.adealab-subcategory-row.is-open td::after {
	content: "−";
	color: var(--adea-white);
}

#tablepress-1 tbody tr.adealab-subcategory-row.is-open .adealab-toggle-hint {
	display: none !important;
}

/* Uvek otvorena (alwaysOpen u Custom Commands) — bez +/−, nije klikabilna */
#tablepress-1 tbody tr.adealab-subcategory-row.is-static {
	cursor: default;
}

#tablepress-1 tbody tr.adealab-subcategory-row.is-static td::after {
	content: none !important;
}

/* Hover samo za miš i samo na naslovima koji se otvaraju
   (na telefonu bi boja ostala "zalepljena" posle tapa) */
@media (hover: hover) {
	#tablepress-1 tbody tr.adealab-subcategory-row.is-toggle:not(.is-open):hover td {
		background: var(--adea-aqua-soft) !important;
	}

	#tablepress-1 tbody tr.adealab-subcategory-row.is-toggle.is-open:hover td {
		background: var(--adea-turquoise-dark) !important;
	}
}

/* ---------------------------------------------------------
   9. FOKUS (tastatura)
   --------------------------------------------------------- */
#tablepress-1 tr.adealab-subcategory-row:focus-visible td {
	outline: 3px solid rgba(23,175,169,.35);
	outline-offset: -3px;
}

#tablepress-1 a:focus-visible {
	outline: 3px solid rgba(23,175,169,.3);
	outline-offset: 3px;
}

/* ---------------------------------------------------------
   10. PRETRAGA
   --------------------------------------------------------- */
#tablepress-1_wrapper .dt-layout-row:first-child {
	display: flex !important;
	align-items: center;
	justify-content: flex-start !important;
	gap: 24px;
	margin-bottom: 24px;
}

#tablepress-1_wrapper .dt-layout-row:first-child .dt-layout-end {
	order: -1;
	margin: 0 !important;
	text-align: left !important;
}

#tablepress-1_wrapper .dt-search {
	display: flex !important;
	align-items: center;
	justify-content: flex-start !important;
	gap: 14px;
	width: auto;
	margin: 0 !important;
	color: var(--adea-text);
}

#tablepress-1_wrapper .dt-search label {
	display: inline-block;
	flex: 0 0 auto;
	margin: 0 !important;
	color: var(--adea-heading);
	font-family: var(--adea-font-heading);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

#tablepress-1_wrapper .dt-search input {
	width: 420px;
	max-width: 100%;
	min-height: 52px;
	margin: 0 !important;
	padding: 13px 16px;
	border: 1.5px solid #7a8185;
	border-radius: 0;
	background: var(--adea-white);
	color: var(--adea-heading);
	font-family: var(--adea-font-body);
	font-size: 16px; /* ne spuštati ispod 16px — iPhone zumira stranicu */
	box-shadow: none;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

#tablepress-1_wrapper .dt-search input:hover,
#tablepress-1_wrapper .dt-search input:focus {
	border-color: var(--adea-turquoise);
}

#tablepress-1_wrapper .dt-search input:focus {
	outline: 0;
	box-shadow: 0 0 0 4px rgba(23,175,169,.15);
}

/* ---------------------------------------------------------
   11. SAKRIVENE DATATABLES KONTROLE
   --------------------------------------------------------- */
#tablepress-1_wrapper .dt-length,
#tablepress-1_wrapper .dt-info,
#tablepress-1_wrapper .dt-paging {
	display: none !important;
}

/* ---------------------------------------------------------
   12. NEMA REZULTATA
   --------------------------------------------------------- */
#tablepress-1 tbody td.dt-empty {
	padding: 50px 24px;
	background: var(--adea-aqua-soft);
	color: var(--adea-heading);
	font-size: 16px;
	font-weight: 500;
	text-align: center;
}

/* ---------------------------------------------------------
   13. TELEFON (do 767px) — tabela postaje kartice
   --------------------------------------------------------- */
@media (max-width: 767px) {
	#tablepress-1_wrapper {
		margin-top: 28px;
		overflow: hidden;
	}

	/* Pretraga */
	#tablepress-1_wrapper .dt-layout-row:first-child {
		display: block !important;
		margin-bottom: 22px;
	}

	#tablepress-1_wrapper .dt-search {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		width: 100%;
	}

	#tablepress-1_wrapper .dt-search input {
		width: 100% !important;
	}

	/* Tabela */
	#tablepress-1 {
		display: block;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	/* Zaglavlje: vizuelno sakriveno, ostaje za čitače ekrana */
	#tablepress-1 thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	#tablepress-1 tbody {
		display: block;
		width: 100%;
		max-width: 100%;
	}

	/* "Nema rezultata" preko cele širine */
	#tablepress-1 tbody tr:has(> .dt-empty),
	#tablepress-1 tbody td.dt-empty {
		display: block;
	}

	/* Kartica analize.
		   Zatvorene redove JS skriva inline stilom display:none,
		   koji uvek pobeđuje ovaj display:grid. */
	#tablepress-1 tbody tr.adealab-analysis-row {
		display: grid;
		width: 100%;
		max-width: 100%;
		grid-template-columns: minmax(0,1fr) auto;
		grid-template-areas: "analysis price";
		align-items: center;
		gap: 16px;
		margin: 0 0 10px;
		padding: 18px;
		border: 1px solid var(--adea-border);
		background: var(--adea-white);
		box-shadow: 0 6px 20px rgba(35,31,32,.04);
		overflow: hidden;
	}

	#tablepress-1 tbody tr.adealab-analysis-row td {
		width: auto !important;
		border: 0;
		background: transparent !important;
	}

	#tablepress-1 tbody tr.adealab-analysis-row .column-3 {
		display: block !important;
		grid-area: analysis;
		width: 100% !important;
		padding: 0;
		line-height: 1.45;
		overflow-wrap: anywhere;
	}

	#tablepress-1 tbody tr.adealab-analysis-row .column-6 {
		display: block !important;
		grid-area: price;
		width: auto !important;
		min-width: 80px;
		padding: 0;
	}

	#tablepress-1 tbody .column-6::before {
		content: "Cena (RSD)";
		display: block;
		margin-bottom: 4px;
		color: var(--adea-muted);
		font-size: 9px;
		font-weight: 600;
		line-height: 1;
		letter-spacing: .06em;
		text-transform: uppercase;
	}

	#tablepress-1 tbody .column-6 a {
		display: inline-block;
		max-width: 125px;
		white-space: normal;
		line-height: 1.3;
	}

	/* Kategorija i podkategorija — zajedničko */
	#tablepress-1 tbody tr.adealab-category-row,
	#tablepress-1 tbody tr.adealab-subcategory-row {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		overflow: hidden;
	}

	#tablepress-1 tbody tr.adealab-category-row td,
	#tablepress-1 tbody tr.adealab-subcategory-row td {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		overflow-wrap: anywhere;
	}

	/* Kategorija */
	#tablepress-1 tbody tr.adealab-category-row td {
		padding: 16px !important;
		font-size: 16px !important;
		letter-spacing: .025em;
	}

	/* Podkategorija */
	#tablepress-1 tbody tr.adealab-subcategory-row td {
		padding: 14px 42px 14px 20px !important;
		font-size: 15px !important;
	}

	#tablepress-1 tbody tr.adealab-subcategory-row td::after {
		right: 15px;
		font-size: 20px;
	}

	#tablepress-1 .adealab-toggle-hint {
		display: block;
		margin: 4px 0 0;
	}
}

/* ---------------------------------------------------------
   14. KALKULATOR — checkbox ispred analize
   --------------------------------------------------------- */
#tablepress-1 .adealab-pick {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	cursor: pointer;
}

#tablepress-1 .adealab-pick-name {
	min-width: 0;
}

#tablepress-1 .adealab-pick-input {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	padding: 0;
	border: 1.5px solid #7a8185;
	border-radius: 4px;
	background: var(--adea-white);
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease;
}

#tablepress-1 .adealab-pick-input:checked {
	border-color: var(--adea-turquoise);
	background: var(--adea-turquoise);
}

/* kvačica */
#tablepress-1 .adealab-pick-input:checked::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 6px;
	width: 5px;
	height: 10px;
	border: solid var(--adea-white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

#tablepress-1 .adealab-pick-input:focus-visible {
	outline: 3px solid rgba(23,175,169,.35);
	outline-offset: 2px;
}

@media (hover: hover) {
	#tablepress-1 .adealab-pick:hover .adealab-pick-input:not(:checked) {
		border-color: var(--adea-turquoise);
	}
}

/* ---------------------------------------------------------
   15. KALKULATOR — plutajući spisak (dole desno)
   --------------------------------------------------------- */
#adealab-calc {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9990;
	display: flex;
	flex-direction: column;
	width: 340px;
	max-width: calc(100vw - 48px);
	max-height: min(70vh,560px);
	border: 1px solid var(--adea-border);
	background: var(--adea-white);
	box-shadow: 0 18px 50px rgba(35,31,32,.18);
	color: var(--adea-text);
	font-family: var(--adea-font-body);
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
}

#adealab-calc[hidden],
#adealab-calc [hidden] {
	display: none !important;
}

#adealab-calc,
#adealab-calc *,
#adealab-calc ::after {
	box-sizing: border-box;
}

/* Naslov — ujedno dugme za sklapanje */
#adealab-calc .adealab-calc-toggle {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: 0;
	border-radius: 0;
	background: var(--adea-turquoise);
	box-shadow: none;
	color: var(--adea-white);
	font-family: var(--adea-font-heading);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .005em;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

#adealab-calc .adealab-calc-title {
	flex: 1 1 auto;
}

#adealab-calc .adealab-calc-mini {
	display: none;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

#adealab-calc.is-collapsed .adealab-calc-mini {
	display: inline;
}

/* strelica: dole = sklopi, gore = otvori */
#adealab-calc .adealab-calc-chevron {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin: -5px 2px 0 0;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

#adealab-calc.is-collapsed .adealab-calc-chevron {
	margin-top: 5px;
	transform: rotate(-135deg);
}

#adealab-calc .adealab-calc-toggle:focus-visible,
#adealab-calc .adealab-calc-remove:focus-visible,
#adealab-calc .adealab-calc-clear:focus-visible,
#adealab-calc a:focus-visible {
	outline: 3px solid rgba(23,175,169,.35);
	outline-offset: -3px;
}

@media (hover: hover) {
	#adealab-calc .adealab-calc-toggle:hover {
		background: var(--adea-turquoise-dark);
	}
}

/* Spisak */
#adealab-calc .adealab-calc-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

#adealab-calc.is-collapsed .adealab-calc-body {
	display: none;
}

#adealab-calc .adealab-calc-list {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
	padding: 4px 16px;
	overflow-y: auto;
	list-style: none;
}

#adealab-calc .adealab-calc-item {
	display: grid;
	grid-template-columns: minmax(0,1fr) auto 24px;
	align-items: start;
	gap: 10px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--adea-border);
	list-style: none;
}

#adealab-calc .adealab-calc-item:last-child {
	border-bottom: 0;
}

#adealab-calc .adealab-calc-name {
	color: var(--adea-heading);
	overflow-wrap: anywhere;
}

#adealab-calc .adealab-calc-price {
	color: var(--adea-red);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

#adealab-calc .adealab-calc-price a {
	color: var(--adea-red);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#adealab-calc .adealab-calc-remove {
	width: 24px;
	height: 24px;
	margin: -2px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--adea-muted);
	font-family: var(--adea-font-body);
	font-size: 18px;
	line-height: 24px;
	text-align: center;
	cursor: pointer;
}

@media (hover: hover) {
	#adealab-calc .adealab-calc-remove:hover {
		background: var(--adea-aqua-soft);
		color: var(--adea-red);
	}
}

/* Zbir */
#adealab-calc .adealab-calc-foot {
	flex: 0 0 auto;
	padding: 12px 16px 14px;
	border-top: 1px solid var(--adea-border);
	background: var(--adea-aqua-soft);
}

#adealab-calc .adealab-calc-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	color: var(--adea-heading);
	font-family: var(--adea-font-heading);
	font-size: 15px;
	font-weight: 600;
}

#adealab-calc .adealab-calc-total strong {
	color: var(--adea-red);
	font-size: 20px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

#adealab-calc .adealab-calc-note {
	margin: 4px 0 0;
	padding: 0;
	color: var(--adea-muted);
	font-size: 12px;
	line-height: 1.4;
}

#adealab-calc .adealab-calc-clear {
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--adea-muted);
	font-family: var(--adea-font-body);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Telefon: traka preko cele širine, na dnu ekrana */
@media (max-width: 767px) {
	#adealab-calc {
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		max-width: none;
		max-height: 75vh;
		border-width: 1px 0 0;
		box-shadow: 0 -8px 30px rgba(35,31,32,.14);
	}

	#adealab-calc .adealab-calc-toggle {
		padding: 16px 20px;
	}

	#adealab-calc .adealab-calc-list {
		padding: 4px 20px;
	}

	/* dužim zapisom: TablePress pokvari skraćeni padding sa calc() */
	#adealab-calc .adealab-calc-foot {
		padding-right: 20px;
		padding-bottom: calc(14px + env(safe-area-inset-bottom));
		padding-left: 20px;
	}

	#adealab-calc.is-collapsed .adealab-calc-toggle {
		padding-bottom: calc(16px + env(safe-area-inset-bottom));
	}

	/* da traka ne pokrije kraj stranice */
	body.adealab-calc-visible {
		padding-bottom: calc(56px + env(safe-area-inset-bottom));
	}
}

@media print {
	#adealab-calc,
	#tablepress-1 .adealab-pick-input {
		display: none !important;
	}
}