/*!
 * TJ Pristupačnost 1.1.0 – Joomla! 3
 * (C) 2026 TJ studio d.o.o. – https://tjstudio.info
 */

/* ========== Preskoči na sadržaj ========== */
.tjp-skip {
	position: absolute !important;
	left: -9999px !important;
	top: 0 !important;
	z-index: 2147483647 !important;
}
.tjp-skip:focus {
	left: 10px !important;
	top: 10px !important;
	padding: 12px 18px !important;
	background: #000 !important;
	color: #fff !important;
	font: bold 16px/1.2 Arial, sans-serif !important;
	text-decoration: underline !important;
	outline: 3px solid #ffcc00 !important;
	border-radius: 4px !important;
}

/* ========== Widget (izolirani stilovi) ========== */
#tjp-root, #tjp-root * {
	box-sizing: border-box !important;
	font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
	letter-spacing: normal !important;
	word-spacing: normal !important;
	line-height: 1.3 !important;
	text-transform: none !important;
	text-shadow: none !important;
	background-image: none !important;
	background-color: transparent !important;
	color: inherit !important;
	visibility: visible !important;
	animation: none !important;
	filter: none !important;
}
#tjp-root .tjp-sr {
	position: absolute !important; width: 1px !important; height: 1px !important;
	margin: -1px !important; padding: 0 !important; overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
#tjp-root svg { fill: currentColor !important; display: inline-block !important; flex-shrink: 0 !important; }

#tjp-root .tjp-toggle {
	position: fixed !important;
	z-index: 2147483000 !important;
	display: flex !important; align-items: center !important; justify-content: center !important;
	margin: 0 !important; padding: 0 !important;
	border: 3px solid #fff !important;
	border-radius: 50% !important;
	color: #fff !important;
	cursor: pointer !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .35) !important;
	transition: transform .15s ease !important;
}
#tjp-root .tjp-toggle:hover { transform: scale(1.06); }
#tjp-root.tjp-pos-mr .tjp-toggle:hover, #tjp-root.tjp-pos-ml .tjp-toggle:hover { transform: translateY(-50%) scale(1.06); }
#tjp-root .tjp-toggle.tjp-active::after {
	content: "" !important; position: absolute !important; top: -2px !important; right: -2px !important;
	width: 14px !important; height: 14px !important; border-radius: 50% !important;
	background-color: #2ec27e !important; border: 2px solid #fff !important;
}

#tjp-root .tjp-panel {
	position: fixed !important;
	z-index: 2147483001 !important;
	width: 350px !important;
	max-width: calc(100vw - 20px) !important;
	max-height: calc(100vh - 110px) !important;
	display: flex !important; flex-direction: column !important;
	overflow: hidden !important;
	background-color: #fff !important;
	color: #1d1d1f !important;
	border-radius: 12px !important;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3) !important;
	font-size: 14px !important;
	line-height: 1.3 !important;
	text-align: left !important;
}
#tjp-root .tjp-panel[hidden] { display: none !important; }

#tjp-root .tjp-head {
	display: flex !important; align-items: center !important; justify-content: space-between !important;
	padding: 12px 14px !important; color: #fff !important; flex-shrink: 0 !important;
}
#tjp-root .tjp-title {
	display: flex !important; align-items: center !important; gap: 8px !important;
	margin: 0 !important; padding: 0 !important;
	font-size: 18px !important; font-weight: 700 !important; line-height: 1.2 !important; color: #fff !important;
}
#tjp-root .tjp-close {
	display: flex !important; align-items: center !important; justify-content: center !important;
	width: 36px !important; height: 36px !important; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 50% !important; color: #fff !important; cursor: pointer !important;
	background-color: rgba(255, 255, 255, .18) !important;
}
#tjp-root .tjp-close:hover { background-color: rgba(255, 255, 255, .32) !important; }

#tjp-root .tjp-body { padding: 14px !important; overflow-y: auto !important; background-color: #f4f5f7 !important; }

#tjp-root .tjp-font {
	display: flex !important; align-items: center !important; justify-content: space-between !important;
	padding: 10px 12px !important; margin: 0 0 12px !important;
	background-color: #fff !important; border: 1px solid #d5d8dd !important; border-radius: 8px !important;
}
#tjp-root .tjp-font-label { font-size: 14px !important; font-weight: 600 !important; }
#tjp-root .tjp-font-ctrl { display: flex !important; align-items: center !important; gap: 8px !important; }
#tjp-root .tjp-font-ctrl button {
	width: 40px !important; height: 36px !important; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 6px !important; color: #fff !important;
	font-size: 15px !important; font-weight: 700 !important; cursor: pointer !important; line-height: 1 !important;
}
#tjp-root .tjp-font-ctrl button[disabled] { opacity: .35 !important; cursor: not-allowed !important; }
#tjp-root .tjp-fval { min-width: 48px !important; text-align: center !important; font-weight: 700 !important; font-size: 14px !important; }

#tjp-root .tjp-grid {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 8px !important;
}
#tjp-root .tjp-opt {
	display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
	gap: 6px !important; min-height: 78px !important; margin: 0 !important; padding: 10px 6px !important;
	background-color: #fff !important; color: #1d1d1f !important;
	border: 2px solid #d5d8dd !important; border-radius: 8px !important;
	font-size: 13px !important; font-weight: 600 !important; line-height: 1.2 !important; text-align: center !important;
	cursor: pointer !important; white-space: normal !important;
}
#tjp-root .tjp-opt:hover { border-color: #8a8f98 !important; }
#tjp-root .tjp-opt svg { fill: #3d4148 !important; }
#tjp-root .tjp-opt.tjp-on { background-color: #eef4ff !important; }

#tjp-root .tjp-foot {
	display: flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: space-between !important;
	gap: 8px !important; padding: 10px 14px !important; flex-shrink: 0 !important;
	background-color: #fff !important; border-top: 1px solid #e1e3e7 !important;
}
#tjp-root .tjp-reset {
	display: flex !important; align-items: center !important; gap: 6px !important;
	margin: 0 !important; padding: 8px 12px !important;
	background-color: #1d1d1f !important; color: #fff !important;
	border: 0 !important; border-radius: 6px !important;
	font-size: 13px !important; font-weight: 600 !important; cursor: pointer !important;
}
#tjp-root .tjp-stmt, #tjp-root .tjp-credit a {
	color: #0b57d0 !important; text-decoration: underline !important; font-size: 13px !important;
}
#tjp-root .tjp-credit { width: 100% !important; font-size: 11px !important; color: #5f6368 !important; text-align: right !important; }
#tjp-root .tjp-credit a { font-size: 11px !important; color: #5f6368 !important; }

#tjp-root .tjp-guide {
	display: none !important;
	position: fixed !important; left: 0 !important; right: 0 !important; top: -100px;
	height: 28px !important; z-index: 2147482999 !important; pointer-events: none !important;
	border-top: 3px solid #ffbf00 !important; border-bottom: 3px solid #ffbf00 !important;
	background-color: rgba(255, 191, 0, .12) !important;
}
html.tjp-guide #tjp-root .tjp-guide { display: block !important; }

/* Gumb Pročitaj glavni sadržaj */
#tjp-root .tjp-readmain {
	display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
	width: 100% !important; margin: 10px 0 0 !important; padding: 11px 12px !important;
	background-color: #1d1d1f !important; color: #fff !important;
	border: 0 !important; border-radius: 8px !important;
	font-size: 14px !important; font-weight: 600 !important; cursor: pointer !important;
}
#tjp-root .tjp-readmain[hidden] { display: none !important; }

/* Traka čitača */
#tjp-root .tjp-player {
	position: fixed !important; z-index: 2147483002 !important;
	left: 50% !important; bottom: 20px !important; transform: translateX(-50%) !important;
	display: flex !important; align-items: center !important; gap: 10px !important;
	max-width: calc(100vw - 180px) !important;
	padding: 8px 8px 8px 16px !important;
	background-color: #1d1d1f !important; color: #fff !important;
	border-radius: 999px !important; box-shadow: 0 6px 24px rgba(0, 0, 0, .35) !important;
	font-size: 14px !important;
}
#tjp-root .tjp-player[hidden] { display: none !important; }
#tjp-root .tjp-pl-msg { flex: 1 1 auto !important; font-size: 14px !important; color: #fff !important; }
#tjp-root .tjp-player button {
	display: flex !important; align-items: center !important; justify-content: center !important;
	width: 36px !important; height: 36px !important; margin: 0 !important; padding: 0 !important; flex-shrink: 0 !important;
	border: 0 !important; border-radius: 50% !important; cursor: pointer !important;
	background-color: #fff !important; color: #1d1d1f !important;
}
#tjp-root .tjp-player button[hidden] { display: none !important; }

@media (max-width: 480px) {
	#tjp-root .tjp-player { top: 10px !important; bottom: auto !important; max-width: calc(100vw - 20px) !important; width: calc(100vw - 20px) !important; }
	#tjp-root .tjp-panel { left: 10px !important; right: 10px !important; width: auto !important; }
	#tjp-root.tjp-pos-mr .tjp-panel, #tjp-root.tjp-pos-ml .tjp-panel { top: 10px !important; transform: none !important; max-height: calc(100vh - 20px) !important; }
	#tjp-root.tjp-hide-mobile { display: none !important; }
}

/* ========== Načini prikaza (kontrast) ========== */

/* Tamni visoki kontrast */
html.tjp-m-dark, html.tjp-m-dark body { background: #000 !important; }
html.tjp-m-dark body * {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
html.tjp-m-dark body a, html.tjp-m-dark body a * { color: #ffff00 !important; }
html.tjp-m-dark body button, html.tjp-m-dark body input, html.tjp-m-dark body select, html.tjp-m-dark body textarea { border: 1px solid #fff !important; }

/* Svijetli visoki kontrast */
html.tjp-m-light, html.tjp-m-light body { background: #fff !important; }
html.tjp-m-light body * {
	background-color: #fff !important;
	color: #000 !important;
	border-color: #000 !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
html.tjp-m-light body a, html.tjp-m-light body a * { color: #0000c8 !important; }
html.tjp-m-light body button, html.tjp-m-light body input, html.tjp-m-light body select, html.tjp-m-light body textarea { border: 1px solid #000 !important; }

/* Obrnute boje (filter na korijenu ne kvari position:fixed) */
html.tjp-m-invert { background: #fff !important; filter: invert(100%) hue-rotate(180deg) !important; }
html.tjp-m-invert body img,
html.tjp-m-invert body video,
html.tjp-m-invert body iframe,
html.tjp-m-invert body picture img { filter: invert(100%) hue-rotate(180deg) !important; }
html.tjp-m-invert #tjp-root .tjp-toggle,
html.tjp-m-invert #tjp-root .tjp-panel,
html.tjp-m-invert #tjp-root .tjp-guide,
html.tjp-m-invert #tjp-root .tjp-player { filter: invert(100%) hue-rotate(180deg) !important; }

/* Crno-bijelo */
html.tjp-m-gray { filter: grayscale(100%) !important; }

/* ========== Dodatne opcije ========== */

/* Istakni poveznice */
html.tjp-links body a {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 3px !important;
	font-weight: 700 !important;
	outline: 1px dashed currentColor !important;
	outline-offset: 1px !important;
}

/* Čitljiv font (ne dira ikone) */
html.tjp-readable body *:not([class*="icon"]):not([class*="fa-"]):not(.fa):not(i):not([class*="glyph"]) {
	font-family: Verdana, Tahoma, Arial, sans-serif !important;
}

/* Razmak slova i riječi (WCAG 1.4.12) */
html.tjp-spacing body * {
	letter-spacing: .12em !important;
	word-spacing: .16em !important;
}

/* Visina retka */
html.tjp-lineheight body * { line-height: 1.9 !important; }
html.tjp-lineheight body p { margin-bottom: 1.5em !important; }

/* Zaustavi animacije */
html.tjp-noanim *,
html.tjp-noanim *::before,
html.tjp-noanim *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* Veliki pokazivač */
html.tjp-cursor, html.tjp-cursor * {
	cursor: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1.2' d='M5 2l13 12.2-6.3.6 3.6 7.9-2.4 1.1-3.5-7.9L5 20.5z'/%3E%3C/svg%3E") 10 4, auto !important;
}

/* Istakni fokus */
html.tjp-focus *:focus {
	outline: 4px solid #ff6a00 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 7px rgba(255, 106, 0, .35) !important;
}

/* Sakrij slike */
html.tjp-noimg body img,
html.tjp-noimg body picture,
html.tjp-noimg body video,
html.tjp-noimg body figure > svg { visibility: hidden !important; }
html.tjp-noimg body * { background-image: none !important; }

/* Čitanje naglas – označi što se može kliknuti i što se trenutno čita */
html.tjp-tts body p:hover, html.tjp-tts body li:hover, html.tjp-tts body h1:hover, html.tjp-tts body h2:hover,
html.tjp-tts body h3:hover, html.tjp-tts body h4:hover, html.tjp-tts body h5:hover, html.tjp-tts body h6:hover,
html.tjp-tts body td:hover, html.tjp-tts body th:hover, html.tjp-tts body blockquote:hover, html.tjp-tts body dd:hover,
html.tjp-tts body dt:hover, html.tjp-tts body figcaption:hover {
	outline: 1px dashed #8a8f98 !important;
	outline-offset: 2px !important;
	cursor: pointer;
}
html body .tjp-reading.tjp-reading {
	outline: 3px solid #ffbf00 !important;
	outline-offset: 3px !important;
	background-color: rgba(255, 191, 0, .18) !important;
}
