a, button, .darkmode-btn, #menuButton, #backToTop, input, [role="button"] {
    touch-action: manipulation !important;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

#menuButton, #mobile-sidebar {
    will-change: transform;
}

body {
/* font-family: Arial, sans-serif; */
    font-family: 'Segoe UI', Verdana, Tahoma, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
    padding: 10px;
}

body.dark-mode {
    --bg-color: #1e1e1e !important;
    --text-color: #e6e6e6 !important;
    --link-color: #9ecbff !important;
    --border-color: #333 !important;
    --thumb-bg: #2a2a2a !important;
}

h1, h2, h3, h4, h5, h6 {
	color: black;
	background: none;
	font-weight: normal;
	margin: 0;
	padding-top: .5em;
	padding-bottom: .17em;
	border-bottom: 1px solid #aaa;
}

a {
/*    color: #0645ad; */
    color: #3366cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a.new {
    pointer-events: none;
    color: inherit !important;
    text-decoration: none !important;
    cursor: default;
}

img, .thumb img {
    max-width: 100%;
    height: auto;
}

#content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}

#content table {
    width: auto; 
}

#toc, .toc {
    display: none;
}

table {
    table-layout: auto;
}

td, th {
    word-wrap: break-word;
    vertical-align: top;
}

pre {
	padding: 1em;
	border: 1px dashed #2f6fab;
	color: black;
	background-color: #f9f9f9;
	line-height: 1.1em;
  white-space: pre-wrap; 
/*  white-space: normal; */
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: left !important;
}

.center {
	width: 100%;
	text-align: center;
}

*.center * {
	margin-left: auto;
	margin-right: auto;
}

#quickbar, #sidebar {
    display: none;
}

#article {
    margin: 0;
    padding: 0;
}

div.floatright, table.floatright {
	clear: right;
	float: right;
	position: relative;
	margin: 0 0 .5em .5em;
	border: 0;
}

div.floatright p { font-style: italic; }

div.floatleft, table.floatleft {
	float: left;
	position: relative;
	margin: 0 .5em .5em 0;
	border: 0;
}

div.floatleft p { font-style: italic; }

div.thumb {
    margin: 0 0 0.2em 0.1em;
	border-style: solid;
	border-color: white;
}

div.thumb div {
	border: 1px solid #ccc;
	padding: 3px !important;
	background-color: #f9f9f9;
	font-size: 94%;
	text-align: left;
	overflow: hidden;
	line-height: normal;
}
div.thumb div a img {
	border: 1px solid #ccc;
}
div.thumb div div.thumbcaption span {
    display: inline-block;
    width: 50%;
    vertical-align: middle;
}
div.thumb div div.thumbcaption span:first-child {
    text-align: left;
}
div.thumb div div.thumbcaption span:last-child {
    text-align: right;
}

div.tright {
	clear: right;
	float: right;
	border-width: .5em 0 .8em 1.4em;
}
div.tleft {
	float: left;
	margin-right: .5em;
	border-width: .5em 1.4em .8em 0;
}

ul {
	line-height: 1.5em;
	list-style-type: square;
	margin: .3em 0 0 1.5em;
	padding: 0;
}

ul { list-style: square; }
ul li::marker { color: #444; }

.nomob {
    display: none !important;
}

.printfooter {
	display: none;
}

#mobile-sidebar {
    width: 100%;
    margin: 0 0 10px 0;
    padding: 0 10px;
    box-sizing: border-box;
}

#mobile-sidebar .portlet {
/*    margin-bottom: 10px; */
    background: #f8f8f8;
    padding: 0 8px 0 0;
    border-radius: 4px;
}

#mobile-sidebar .portlet a {
    display: block;
    margin: 3px 0;
    text-decoration: none;
/*    color: #0645ad; */
    color: #3366cc;
}

#mobile-sidebar .portlet a:hover {
    text-decoration: underline;
}

#mobile-sidebar .searchInput {
    width: 100%;
    box-sizing: border-box;
    margin: 5px 0;
}

#menuToggle {
    display: none;
}

#menuButton {
    display: block;
    background: #333;
    color: white;
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
}
/*
#mobile-sidebar {
    display: none;
    padding: 10px;
    background: #f0f0f0;
}

#menuToggle:checked + #menuButton + #mobile-sidebar {
    display: block;
}
*/
#mobile-sidebar {
/*    display: none; */
    max-height: 0;
    overflow: hidden;
    padding: 0 10px;
    background: #f0f0f0;
    transition: max-height 0.3s ease-out; 
}

body.is-main-page #mobile-sidebar {
    max-height: none !important; 
    display: block !important;
    transition: none !important;
}

body.is-main-page #menuToggle {
    display: none;
}

#menuToggle:checked + #menuButton + #mobile-sidebar {
    display: block !important;
    max-height: 1000px;
    padding: 10px;
}

.sidebar-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.sidebar-logo {
    width: 100px;
    height: auto;
}

.sidebar-search {
    margin-left: auto;
    min-width: 120px;
}

.sidebar-search h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.sidebar-search .pBody {
    padding: 0;
}

#searchInput {
    width: 200px;
    padding: 4px;
    font-size: 14px;
    border: 1px solid #aaa;
    border-radius: 4px;
}

.searchButton {
    margin-top: 4px;
    padding: 3px 6px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.sidebar-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    text-decoration: none;
/*    color: #0645ad; */
    color: #3366cc;
}

#catlinks {
	border: 1px solid #aaa;
	background-color: #f9f9f9;
	padding: 5px;
	margin-top: 1em;
	clear: both;
}

.catalogue-box {
    background-color: #f9f9f9;
    text-align: center;
    border: 1px solid #ccc;
    margin: 10px;
    padding: 10px;
}

.praznici-container {
    border-collapse: collapse;
}

.praznici-month {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    width: 230px !important;
    text-align: center;
    border-collapse: collapse;
    margin: 5px;
}

.praznici-month th {
    text-align: center;
    background-color: #f0f0f9;
    padding: 4px;
    border-bottom: 1px solid #ccc;
}

.praznici-month td {
    text-align: left;
    vertical-align: top;
    font-size: 0.95em;
    padding: 2px 4px;
    border-bottom: 1px solid #eee;
}

.praznici-month td.date {
    text-align: right;
    font-weight: bold;
}

.praznici-movable {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    width: 100% !important;
    border-collapse: collapse;
    margin-top: 20px;
}

.praznici-movable th {
    text-align: center;
    background-color: #f0f0f9;
    padding-bottom: 4px;
    border-bottom: 1px solid #ccc;
}

.praznici-movable td {
    padding: 2px 4px;
    vertical-align: top;
    font-size: 0.95em;
    border-collapse: collapse;
}

.praznici-movable td.date {
    text-align: right;
    padding-right: 5px;
    font-weight: bold;
}

.praznici-movable td.centered {
    text-align: center;
    border: 1px solid #ccc;
    vertical-align: top;
}

.praznici-movable td.centered-header {
    background-color: #f0f0f9;
}

.fastingrules {
    width: 70%;
    padding: 0 6pt;
    text-align: justify;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

#backToTop {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f9f9f9;
    color: #000;
    font-size: 22px;
    border: none;
    cursor: pointer;
    border: 2px solid #ccc; 
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

#backToTop:active {
    background: #d9d9d9 !important; 
}

#backToTop.show {
    display: flex;
    opacity: 1;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1e1e1e;
        --text-color: #e6e6e6;
        --link-color: #9ecbff;
        --border-color: #333;
        --thumb-bg: #2a2a2a;
    }
}

@media (prefers-color-scheme: dark) {
    ul li::marker { color: #c7a4d0; }
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #ffffff;
        --text-color: #000000;
/*        --link-color: #0645ad; */
        --link-color: #3366cc;
        --border-color: #ccc;
        --thumb-bg: #f9f9f9;
    }
}

@media (max-width: 400px) {
    .sidebar-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar-search {
        margin-left: 0;
        width: 100%;
    }

    #searchInput {
        width: 100%;
    }
}

.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

.dark-mode a {
    color: #9ecbff;
}

.dark-mode a.new {
    color: #e0e0e0 !important;
}

.dark-mode .portlet {
    background: #1e1e1e;
    border-color: #333;
}

.dark-mode #searchInput {
    background: #222;
    color: #fff;
    border: 1px solid #555;
}

.dark-mode .searchButton {
    background: #444;
}

.darkmode-btn {
    margin-top: 10px;
		width: 155px;
    padding: 8px;
    font-size: 16px;
    background: #333;
    border: 1px solid #777;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

.darkmode-btn:active {
    background: #555;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3 {
    color: #fff;
}

.dark-mode .thumb {
    background: #000;
    border-color: #000;
}

.dark-mode table {
    background: #000;
    color: #ddd;
}

.dark-mode #mobile-sidebar-container {
    background: #181818 !important;
    border-bottom: 1px solid #333 !important;
/*    min-height: 300px; */
}

.dark-mode #menuButton {
/*    background: #2b2b2b !important; */
    background: #333 !important;
    color: #f0f0f0 !important;
    border: 1px solid #444 !important;
}

.dark-mode #menuButton:active {
    background: #3a3a3a !important;
}

.dark-mode #mobile-sidebar {
    background: #1c1c1c !important;
}

.dark-mode .sidebar-flex {
    background: #1c1c1c !important;
    color: #eee !important;
}

.dark-mode .sidebar-logo {
    filter: brightness(0.85);
}

.dark-mode #mobile-sidebar a {
    color: #9ecbff !important;
}

.dark-mode #mobile-sidebar a:hover {
    color: #bfe0ff !important;
}

.dark-mode #mobile-sidebar .portlet {
    background: #1c1c1c !important;
    border-color: #444 !important;
}

.dark-mode #mobile-sidebar .pBody {
    background: #1c1c1c !important;
    color: #eee !important;
}

.dark-mode #mobile-sidebar li {
    border-color: #333 !important;
}

.dark-mode #mobile-sidebar h5 {
    color: #ddd !important;
}

.dark-mode #searchInput {
    background: #222 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

.dark-mode #mobile-sidebar .searchButton {
    background: #444 !important;
    color: #f0f0f0 !important;
    border: 1px solid #555 !important;
}

.dark-mode .darkmode-btn {
    background: #000 !important;
    color: #eee !important;
    border: 1px solid #444 !important;
}

.dark-mode .darkmode-btn:active {
    background: #333 !important;
}

#darkmode-toggle {
    position: absolute;
    top: 5px;
    right: 15px;
    z-index: 1000;
}

/*
#darkmode-title {
    display: none; 
}
*/

#darkmode-title {
    display: block !important; 
		pointer-events: none;
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    color: #eee; 
    background-color: #333;
    padding: 0 5px;
}

.site-title {
/*    color: #eee; */
    white-space: nowrap;
}

.okvir1-wrapper {
    margin-top: 4px;
    margin-bottom: 0px;
    border: 1px solid #ccc;
    background: #f9f9f9;
}

.okvir1-header {
    text-align: center;
    border-bottom: 1px solid #ccc;
    background-color: #f0f0f9;
    padding: 2px;
}

.okvir1-body {
    padding: 5px;
    text-align: justify;
}

.dark-mode .okvir1-wrapper {
    border-color: #555 !important;
    background: #1a1a1a !important;
}

.dark-mode .okvir1-header {
    background-color: #2a2a2a !important;
    border-bottom-color: #555 !important;
    color: #f0f0f0 !important;
}

.dark-mode .okvir1-body {
    background: #1a1a1a !important;
    color: #ddd !important;
}

.okvir2-table {
    background-color: #f9f9f9;
    text-align: center;
    border: 1px solid #ccc;
    margin-left: 15px;
    margin-top: 4px;
    width: auto;
}

.okvir2-header {
    background-color: #f9f9f9;
    padding: 5px;
}

.okvir2-body {
    background-color: #f9f9f9;
    font-size: 11px;
    padding: 5px;
    text-align: center;
}

.dark-mode .okvir2-table {
    background-color: #1a1a1a !important;
    border-color: #555 !important;
}

.dark-mode .okvir2-header {
    background-color: #222 !important;
    color: #eee !important;
}

.dark-mode .okvir2-body {
    background-color: #222 !important;
    color: #eee !important;
}

.dark-mode div.thumb div {
    border: 1px solid #555 !important;
    background-color: #1d1d1d !important;
    color: #ddd !important;
}

.dark-mode img {
    filter: brightness(0.85);
    transition: filter 0.3s ease;
}

.dark-mode div.thumb div a img {
    border: 1px solid #666 !important;
}

.dark-mode div.thumb div div.thumbcaption {
    color: #ccc !important; 
}

.dark-mode #catlinks {
    background-color: #222 !important;
    border-color: #444 !important;
    color: #ddd !important;
}

.dark-mode #catlinks a {
    color: #9ecbff !important;
}

.dark-mode #catlinks a:hover {
    color: #bfe0ff !important;
}

.dark-mode .catalogue-box {
    background-color: #1c1c1c !important;
    border: 1px solid #444 !important;
    color: #ddd !important;
}

.dark-mode .catalogue-box a {
    color: #9ecbff !important;
}

.dark-mode .catalogue-box a:hover {
    color: #bfe0ff !important;
}

.dark-mode .praznici-month {
    background-color: #1c1c1c !important;
    border: 1px solid #444 !important;
    color: #ddd !important;
}

.dark-mode .praznici-month th {
    background-color: #2b2b2b !important;
    color: #eee !important;
    border-bottom: 1px solid #444 !important;
}

.dark-mode .praznici-month td {
    border-bottom: 1px solid #333 !important;
    color: #ddd !important;
}

.dark-mode .praznici-month a {
    color: #9ecbff !important;
}

.dark-mode .praznici-month a:hover {
    color: #bfe0ff !important;
}

.dark-mode .praznici-movable {
    background-color: #1c1c1c !important;
    border: 1px solid #444 !important;
    color: #ddd !important;
    width: 100% !important;
}

.dark-mode .praznici-movable th {
    background-color: #2b2b2b !important;
    color: #eee !important;
    border-bottom: 1px solid #444 !important;
}

.dark-mode .praznici-movable td {
    color: #ddd !important;
    border-color: #333 !important;
}

.dark-mode .praznici-movable a {
    color: #9ecbff !important;
}

.dark-mode .praznici-movable a:hover {
    color: #bfe0ff !important;
}

.dark-mode .praznici-movable td.centered-header {
    background-color: #2b2b2b !important;
    color: #eee !important;
    border-color: #444 !important;
}

.dark-mode .fastingrules {
    background-color: #1e1e1e;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
    color: #e0e0e0;
    border-bottom: 1px solid #555;
    background: none;
}

.dark-mode pre {
    border: 1px dashed #6cb0ff;
    color: #e6e6e6;
    background-color: #1e1e1e;
    white-space: pre-wrap; 
/*  white-space: normal; */
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    text-align: left !important;
}

.dark-mode #backToTop {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

.dark-mode #backToTop:active {
    background: #50294f !important; 
}

body.warm-night {
    background-color: #1f1a25;
    color: #e3d8ce;
}

body.warm-night a,
body.warm-night a:link,
body.warm-night a:visited,
body.warm-night a:hover {
    color: #ffcc80 !important;
}

body.warm-night ul li::marker {
    color: #ffdd88;
}

body.warm-night a.new {
    color: #e3d8ce !important;
}

body.warm-night #mobile-sidebar a {
    color: #ffcc80 !important;
}

body.warm-night #mobile-sidebar a:hover {
    color: #ffcc80 !important;
}

body.warm-night #mobile-sidebar,
body.warm-night #mobile-sidebar .portlet,
body.warm-night #mobile-sidebar .pBody {
    background-color: #2a2331 !important;
    color: #e8dfd6 !important;
    border-color: #4a3b4e !important;
}

body.warm-night #mobile-sidebar h5 {
    color: #e8dfd6 !important;
}

body.warm-night #mobile-sidebar .searchButton {
    background: #5a3b5e !important;
    color: #e8dfd6 !important;
    border: 1px solid #7b6380 !important;
}

body.warm-night table {
    background-color: #1f1a25 !important;
    border-color: #444 !important;
}

body.warm-night .thumb {
    background-color: #1f1a25 !important;
    border-color: #1f1a25 !important;
}

body.warm-night .thumb div {
    border: 1px solid #4a3b4e !important;
    background-color: #2a2331 !important;
    color: #e8dfd6 !important;
}

body.warm-night input,
body.warm-night textarea,
body.warm-night select {
    background-color: #333;
    color: #ffd;
    border-color: #555;
}

body.warm-night #catlinks,
body.warm-night .fastingrules {
    background-color: #2a2331 !important;
    border-color: #4a3b4e !important;
    color: #e8dfd6 !important;
}

body.warm-night #catlinks a {
    color: #ffcc80 !important;
}

body.warm-night .catalogue-box {
    background-color: #2a2331 !important;
    border-color: #4a3b4e !important;
    color: #e8dfd6 !important;
}

body.warm-night .catalogue-box a, 
body.warm-night .catalogue-box a:link, 
body.warm-night .catalogue-box a:visited,  
body.warm-night .catalogue-box a:hover { 
    color: #ffcc80 !important;
}

.warm-night .okvir1-wrapper {
    border-color: #3a2f40 !important;
    background: #1f1a25 !important;      
}

.warm-night .okvir1-header {
    background-color: #2a2331 !important;   
    border-bottom-color: #4a3b4e !important;
    color: #e8dfd6 !important;               
}

.warm-night .okvir1-body {
    background: #1f1a25 !important;
    color: #e3d8ce !important;
}

.warm-night .okvir2-table {
    background-color: #1f1a25 !important;
    border-color: #4a3b4e !important;
}
.warm-night .okvir2-header {
    background-color: #2a2331 !important;
    color: #e8dfd6 !important;
}
.warm-night .okvir2-body {
    background-color: #2a2331 !important;
    color: #e8dfd6 !important;
}

body.warm-night h1, body.warm-night h2, body.warm-night h3,
body.warm-night h4, body.warm-night h5, body.warm-night h6 {
    color: #e8dfd6;
    border-bottom: 1px solid #4a3b4e;
    background: none;
}

body.warm-night pre {
    background-color: #2a2331;
    color: #e3d8ce;
    border: 1px dashed #ffcc80;
}

body.warm-night div.thumb div {
    border: 1px solid #4a3b4e !important;
    background-color: #2a2331 !important;
    color: #e8dfd6 !important;
}

body.warm-night div.thumb div a img {
    border: 1px solid #4a3b4e !important;
}

body.warm-night .praznici-month {
    background-color: #2a2331 !important;
    border-color: #4a3b4e !important;
    color: #e8dfd6 !important;
}

body.warm-night .praznici-month a {
    color: #ffcc80 !important;
}

body.warm-night .praznici-movable {
    background-color: #2a2331 !important;
    border-color: #4a3b4e !important;
    color: #e8dfd6 !important;
    width: 100% !important;
}

body.warm-night .praznici-movable a {
    color: #ffcc80 !important;
}

body.warm-night #backToTop {
    background-color: #2a2331;
    color: #e8dfd6;
    border: 2px solid #4a3b4e;
}

body.warm-night .sidebar-menu a,
body.warm-night .sidebar-menu a:link,
body.warm-night .sidebar-menu a:visited,
body.warm-night .sidebar-menu a:hover {
    color: #ffcc80 !important;
}

body.warm-night #darkmode-title {
    background-color: #3a2335;
    color: #e8dfd6;
}

body.warm-night #menuButton {
    background: #3a2335 !important; 
    color: #e8dfd6 !important;      
    border: 1px solid #5a3b5e !important; 
}

body.warm-night #menuButton:active {
    background: #50294f !important; 
}

body.warm-night .darkmode-btn {
    background: #1f1a25 !important;
    color: #e8dfd6 !important;
    border: 1px solid #444 !important;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-left: 1rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.switch.hidden {
  opacity: 0;
  visibility: hidden;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border-radius: 34px;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

body.dark-mode .slider {
  background-color: #444;          
  box-shadow: 0 0 3px #000 inset;
}

body.dark-mode input:checked + .slider {
  background-color: #d87b2f;        
  box-shadow: 0 0 4px #ffb16f inset;
}

body.dark-mode.warm-night .slider {
  background-color: #5f3a21;     
}

body.dark-mode.warm-night input:checked + .slider {
  background-color: #ff8a3d;
  box-shadow: 0 0 6px #ffb781 inset;
}

.slider:before {
  content: "";
  position: absolute;
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #e6e6e6;     
  border-radius: 50%;
  transition: transform 0.35s ease, background-color 0.35s ease;
}

body.dark-mode.warm-night .slider:before {
  background-color: #f3d6b8;
}

input:checked + .slider:before {
  transform: translateX(26px);
}


#mobile-sidebar .pBody.sidebar-flex {
    position: relative;
}

.warm-slider-wrapper {
    position: absolute;
    right: 7px;     
    bottom: 12px;   
    z-index: 50;
}

#warm-slider {
    display: block;
}

.warm-slider-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: inherit; 
    backdrop-filter: blur(4px);   
}

.warm-slider-box.hidden {
  opacity: 0;
  visibility: hidden;
}

.warm-slider-text {
    font-size: 0.9rem;
    color: #ddd;
    user-select: none;
    white-space: nowrap;
}

body.dark-mode.warm-night .warm-slider-text {
    color: #f8d3a3;
}

@media (prefers-color-scheme: dark) {
    #content [style*="color:#cc0000" i] {
        color: #ff6b6b !important; 
    }
    #content [style*="color:#c00" i] {
        color: #ff6b6b !important; 
    }
    #content [style*="color:#ff0000" i] {
        color: #ff6b6b !important;
    }
    #content [style*="color:#008000" i] {
        color: #32CD32 !important; 
    }
    #content [style*="color:green" i] {
        color: #32CD32 !important;
    }
    #content [color*="#ff0000" i] {
        color: #ff6b6b !important;
    }
    #content [bgcolor*="#dddddd" i] {
        background-color: inherit !important;
    }
    #content [bgcolor*="#eeeeee" i] {
        background-color: inherit !important;
    }
    #content [style*="border: solid 1px #ccc" i] {
        border-color: #5a3b5e !important; 
    }
}

#searchBody {
    position: relative;
}

#searchError {
    position: absolute;
    top: 29px; 
    left: 50%;
    transform: translateX(-70%);
    
    max-width: 90vw;
    background: #fff;
    padding: 8px 12px;
    border: 1px solid #d9534f;
    border-radius: 6px;
    box-shadow: 4px 6px 16px rgba(0, 0, 0, 0.80);
    z-index: 9999;

    font-size: 0.85rem;
    color: #c00;
    display: none; 
    white-space: nowrap;
}

body.dark-mode #searchError {
    background: #2a2a2a !important;
    color: #ff8686 !important;
    border-color: #aa4444 !important;
}

body.warm-night #searchError {
    background: #2a2331 !important;
    color: #ff8686 !important;
    border-color: #aa6666 !important;
}

.inputError {
    border-color: #d9534f !important;
}

.theme-hint {
    position: fixed;
		top: 70px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    background: #fff;
    color: #222;
    border: 2px solid #555;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.95em;
    box-shadow: -4px -4px 12px rgba(255,255,255,0.6),
                 4px 4px 14px rgba(0,0,0,0.80);
    z-index: 9999;
}

body.dark-mode .theme-hint {
    background: #1e1e1e;
    color: #eee;
    border-color: #444;
}

.theme-hint button {
    margin-top: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #0078d4;
    color: #fff;
    cursor: pointer;
}

.theme-hint.hidden {
    display: none;
}





@media screen and (max-width: 768px) {

    html, body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important; 
        position: relative;
    }

    #content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px !important; 
        box-sizing: border-box !important;
        display: block !important;
    }

    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    table, .praznici-month, .praznici-movable, .okvir1-wrapper, .okvir2-table {
        display: table; 
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        table-layout: auto !important;
    }

    .praznici-month {
        width: 100% !important;
        min-width: 0 !important;
        display: block !important; 
        overflow-x: auto;
    }

    .sidebar-logo, .sidebar-flex, #menuButton {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #searchInput {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media screen and (max-width: 768px) {

    #darkmode-title {
        position: relative !important; 
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        text-align: center !important;
        padding: 10px 5px !important;
        font-size: 1.1em !important;
        white-space: normal !important;
        min-height: 50px !important;
        display: block !important;
        box-sizing: border-box !important;
        background-color: var(--bg-color, inherit);
    }

    #menuButton, .sidebar-flex {
        position: relative !important;
        margin-top: 0 !important;
    }

    html, body {
        width: 100vw !important;
        overflow-x: hidden !important;
        -webkit-text-size-adjust: 100%;
    }
}

@media screen and (max-width: 479px) and (orientation: portrait) { 
    #darkmode-title {
/*        display: none !important; */
        visibility: hidden !important; 
        opacity: 0 !important;
        min-height: 50px !important;
    }
}

img.sidebar-logo {
    width: 148px !important;
/*    height: 225px !important; */
    height: auto !important;
/*    aspect-ratio: 148 / 225; */
    display: block;
    object-fit: cover;
    object-position: top center;
}

@media screen and (max-width: 480px) {

    img[src*="Kalendar.jpg"] {
        width: 170px !important; 
        margin: 0 auto;
        display: block;
    }
    
    img[src*="Krst5.manji.gif"] {
        width: 44px !important;
/*        height: 53px !important; */
        height: auto !important;
        margin: 0 auto;
        display: block;
    }

    img.sidebar-logo {
        width: 98px !important;
/*        height: 150px !important; */
        height: auto !important;
        margin: 0 auto;
        display: block;
    }

    #content img, 
    .thumb img, 
    img[src*="images"] {
        max-width: 66% !important; 
        height: auto !important;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    img.icon, .not-scaled {
        max-width: 100% !important;
    }
    
    table.okvir2-table td.okvir2-body a {
        display: inline-block !important;
        padding: 4px 0px !important; 
    }
}

/*
@media screen and (max-width: 480px) {

    table.okvir2-table td.okvir2-body a {
        display: inline-block !important;
        padding: 4px 0px !important; 
    }
}
*/

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

.article-content-wrapper {
    width: 80%;
    max-width: 1100px;
    line-height: normal;
    margin: 0 auto;
/*    contain: layout style; */
/*    content-visibility: auto;
    contain-intrinsic-size: auto 1000px; */
    will-change: transform;
}

.theological-para {
    margin-bottom: 6pt;
    text-indent: 0.5in;
    text-align: justify;
    text-justify: inter-word;
    overflow-wrap: break-word; 
    text-rendering: optimizeSpeed;
/*    hyphens: auto; */
}

.article-chunk {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px; 
    will-change: transform;
}

.dark-mode iframe {
    filter: invert(1) hue-rotate(180deg);
}

.floating-box {
    top: 130px;
    left: 60px;
    z-index: 9999;
    padding: 10px 15px;
    
    position: -webkit-sticky; 
    position: sticky;
/*    margin-right: clamp(0px, 5vw, 100px); */
}

@media screen and (max-height: 550px) and (orientation: landscape) {
    .floating-box {
/*        position: fixed !important; */
        top: 0 !important;
        left: 5px !important;
        transform: none !important;
        
 /*       max-height: 95svh !important; */
        overflow-y: auto !important;
        
        margin-top: 0 !important;
        padding: 10px !important;
        width: auto !important;
/*        max-width: 40% !important; */
    }
}

/* * { outline: 1px solid red !important; } */
