/* Theme Classes */
.dark {
	background: #0D1F2D !important;
	color: #FFF !important;
}

.light {
	background: #fff !important;
	color: #000 !important;
}

/* Ensure theme is applied to all levels */
#dark,
#dark body,
#dark #root,
html.dark,
html.dark body,
html.dark #root {
	background: #0D1F2D !important;
	color: #FFF !important;
}

#light,
#light body,
#light #root,
html.light,
html.light body,
html.light #root {
	background: #fff !important;
	color: #000 !important;
}

/* Force text colors instantly when theme changes, but allow smooth transitions on hover */
html.dark *,
html#dark *,
body.dark *,
body#dark *,
.dark *,
#dark * {
	color: #FFF !important;
}

html.light *,
html#light *,
body.light *,
body#light *,
.light *,
#light * {
	color: #000 !important;
}

/* Smooth transitions for interactive elements */
html.dark a,
html.dark button,
html.dark .MuiIconButton-root,
html.dark .MuiCard-root,
html.dark .MuiPaper-root,
html#dark a,
html#dark button,
html#dark .MuiIconButton-root,
html#dark .MuiCard-root,
html#dark .MuiPaper-root {
	transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html.light a,
html.light button,
html.light .MuiIconButton-root,
html.light .MuiCard-root,
html.light .MuiPaper-root,
html#light a,
html#light button,
html#light .MuiIconButton-root,
html#light .MuiCard-root,
html#light .MuiPaper-root {
	transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Allow primary colors to show through */
html.dark [class*="primary"],
html#dark [class*="primary"],
#dark [class*="primary"] {
	color: #166fe5 !important;
}

html.light [class*="primary"],
html#light [class*="primary"],
#light [class*="primary"] {
	color: #166fe5 !important;
}

/* Platform Icons in Avatars - ALWAYS WHITE (on colored backgrounds) */
html.dark .MuiAvatar-root .MuiSvgIcon-root,
html.dark .MuiAvatar-root img,
html#dark .MuiAvatar-root .MuiSvgIcon-root,
html#dark .MuiAvatar-root img,
#dark .MuiAvatar-root .MuiSvgIcon-root,
#dark .MuiAvatar-root img,
html.light .MuiAvatar-root .MuiSvgIcon-root,
html.light .MuiAvatar-root img,
html#light .MuiAvatar-root .MuiSvgIcon-root,
html#light .MuiAvatar-root img,
#light .MuiAvatar-root .MuiSvgIcon-root,
#light .MuiAvatar-root img {
	color: #fff !important;
	fill: #fff !important;
	filter: brightness(0) invert(1) !important;
}

/* UI Utility Icons - Adapt to theme for visibility */
/* Dark mode - lighter for visibility on dark background */
html.dark .MuiSvgIcon-root:not(.MuiAvatar-root *),
html#dark .MuiSvgIcon-root:not(.MuiAvatar-root *),
#dark .MuiSvgIcon-root:not(.MuiAvatar-root *) {
	color: rgba(255, 255, 255, 0.7) !important;
}

/* Light mode - darker for visibility on light background */
html.light .MuiSvgIcon-root:not(.MuiAvatar-root *),
html#light .MuiSvgIcon-root:not(.MuiAvatar-root *),
#light .MuiSvgIcon-root:not(.MuiAvatar-root *) {
	color: rgba(0, 0, 0, 0.6) !important;
}

/* Specific icon exceptions for better visibility */
/* Search icon, clock icon, arrow icons - theme adaptive */
html.dark .MuiInputAdornment-root .MuiSvgIcon-root,
html#dark .MuiInputAdornment-root .MuiSvgIcon-root,
#dark .MuiInputAdornment-root .MuiSvgIcon-root {
	color: rgba(255, 255, 255, 0.5) !important;
}

html.light .MuiInputAdornment-root .MuiSvgIcon-root,
html#light .MuiInputAdornment-root .MuiSvgIcon-root,
#light .MuiInputAdornment-root .MuiSvgIcon-root {
	color: rgba(0, 0, 0, 0.4) !important;
}

/* Scroll buttons - visible in both modes */
html.dark .MuiTabs-scrollButtons .MuiSvgIcon-root,
html#dark .MuiTabs-scrollButtons .MuiSvgIcon-root,
#dark .MuiTabs-scrollButtons .MuiSvgIcon-root {
	color: rgba(255, 255, 255, 0.7) !important;
}

html.light .MuiTabs-scrollButtons .MuiSvgIcon-root,
html#light .MuiTabs-scrollButtons .MuiSvgIcon-root,
#light .MuiTabs-scrollButtons .MuiSvgIcon-root {
	color: rgba(0, 0, 0, 0.6) !important;
}

/* Icon buttons hover - make icons brighter */
html.dark .MuiIconButton-root:hover .MuiSvgIcon-root:not(.MuiAvatar-root *),
html#dark .MuiIconButton-root:hover .MuiSvgIcon-root:not(.MuiAvatar-root *),
#dark .MuiIconButton-root:hover .MuiSvgIcon-root:not(.MuiAvatar-root *) {
	color: rgba(255, 255, 255, 0.9) !important;
}

html.light .MuiIconButton-root:hover .MuiSvgIcon-root:not(.MuiAvatar-root *),
html#light .MuiIconButton-root:hover .MuiSvgIcon-root:not(.MuiAvatar-root *),
#light .MuiIconButton-root:hover .MuiSvgIcon-root:not(.MuiAvatar-root *) {
	color: rgba(0, 0, 0, 0.8) !important;
}

/* External link icon - primary color for better visibility */
html.dark .MuiCardContent-root .MuiSvgIcon-root[data-testid*="OpenInNew"],
html#dark .MuiCardContent-root .MuiSvgIcon-root[data-testid*="OpenInNew"],
#dark .MuiCardContent-root .MuiSvgIcon-root[data-testid*="OpenInNew"],
html.light .MuiCardContent-root .MuiSvgIcon-root[data-testid*="OpenInNew"],
html#light .MuiCardContent-root .MuiSvgIcon-root[data-testid*="OpenInNew"],
#light .MuiCardContent-root .MuiSvgIcon-root[data-testid*="OpenInNew"] {
	color: #166fe5 !important;
}

/* Time icons - subtle but visible */
html.dark [class*="AccessTime"],
html#dark [class*="AccessTime"],
#dark [class*="AccessTime"] {
	color: rgba(255, 255, 255, 0.5) !important;
}

html.light [class*="AccessTime"],
html#light [class*="AccessTime"],
#light [class*="AccessTime"] {
	color: rgba(0, 0, 0, 0.4) !important;
}

/* Hover effects for links and buttons */
html.dark a:hover,
html#dark a:hover,
#dark a:hover {
	color: #4d8ef7 !important;
	text-decoration: none !important;
}

html.light a:hover,
html#light a:hover,
#light a:hover {
	color: #0d5bbf !important;
	text-decoration: none !important;
}

/* Card hover effects */
html.dark .MuiCard-root:hover,
html#dark .MuiCard-root:hover,
#dark .MuiCard-root:hover {
	transform: translateY(-4px) !important;
	box-shadow: 0 8px 24px rgba(22, 111, 229, 0.3) !important;
}

html.light .MuiCard-root:hover,
html#light .MuiCard-root:hover,
#light .MuiCard-root:hover {
	transform: translateY(-4px) !important;
	box-shadow: 0 8px 24px rgba(22, 111, 229, 0.15) !important;
}

/* Button hover effects */
html.dark .MuiIconButton-root:hover,
html#dark .MuiIconButton-root:hover,
#dark .MuiIconButton-root:hover {
	background-color: rgba(255, 255, 255, 0.1) !important;
}

html.light .MuiIconButton-root:hover,
html#light .MuiIconButton-root:hover,
#light .MuiIconButton-root:hover {
	background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Tab hover effects */
html.dark .MuiTab-root:hover,
html#dark .MuiTab-root:hover,
#dark .MuiTab-root:hover {
	background-color: rgba(22, 111, 229, 0.08) !important;
}

html.light .MuiTab-root:hover,
html#light .MuiTab-root:hover,
#light .MuiTab-root:hover {
	background-color: rgba(22, 111, 229, 0.04) !important;
}

/* Menu Styles */
#light .bm-menu a {
	color: #000 !important;
	text-decoration: none !important;
}

#dark .bm-menu a {
	color: #fff !important;
	text-decoration: none !important;
}

#dark .bm-menu a:hover,
#light .bm-menu a:hover {
	color: #007bff !important;
}

/* Pagination */
.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
}

#dark .paginationItem {
	background: #fff;
	border: 2px solid #666;
	padding: 10px 15px;
	border-radius: 50%;
	height: 45px;
	width: 45px;
	position: relative;
	margin: 0 5px;
	cursor: pointer;
}

#light .paginationItem {
	background: #166fe5;
	border: 2px solid #fff;
	padding: 10px 15px;
	border-radius: 50%;
	height: 45px;
	width: 45px;
	position: relative;
	margin: 0 5px;
	cursor: pointer;
	color: #fff;
}

.paginationItem span {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

#dark .prev,
#dark .next {
	background: #fff;
	border: none;
	padding: 10px;
	color: #0D1F2D;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
	margin: 0 10px;
	cursor: pointer;
}

#light .prev,
#light .next {
	background: #166fe5;
	border: none;
	padding: 10px;
	color: #fff;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
	margin: 0 10px;
	cursor: pointer;
}

.paginationItem.active {
	border: 1px solid #888;
	color: #888;
	pointer-events: none;
}

.prev.disabled,
.next.disabled {
	pointer-events: none;
	box-shadow: none;
	color: #999;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
	-webkit-appearance: none;
}

::-webkit-scrollbar:vertical {
	width: 12px;
}

::-webkit-scrollbar:horizontal {
	height: 12px;
}

/* Dark Mode Scrollbar */
#dark ::-webkit-scrollbar-thumb {
	background-color: #166fe5;
	border-radius: 10px;
	border: 2px solid #0D1F2D;
}

#dark ::-webkit-scrollbar-track {
	border-radius: 10px;
	background-color: #16354a;
}

/* Light Mode Scrollbar */
#light ::-webkit-scrollbar-thumb {
	background-color: #166fe5;
	border-radius: 10px;
	border: 2px solid #ffffff;
}

#light ::-webkit-scrollbar-track {
	border-radius: 10px;
	background-color: #f8fafc;
}

/* Autofill Styling */
#dark input:-webkit-autofill,
#dark input:-webkit-autofill:hover,
#dark input:-webkit-autofill:focus,
#dark input:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 30px #0D1F2D inset !important;
	-webkit-text-fill-color: #ffffff !important;
}

#light input:-webkit-autofill,
#light input:-webkit-autofill:hover,
#light input:-webkit-autofill:focus,
#light input:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 30px #fff inset !important;
	-webkit-text-fill-color: #000 !important;
}

/* Button Styles */
.btn {
	font-size: 0.9rem !important;
}

/* Text Colors */
#dark p,
#dark h1,
#dark h2,
#dark h3,
#dark h4,
#dark h5,
#dark h6,
#dark a {
	color: #fff;
}

#light p,
#light h1,
#light h2,
#light h3,
#light h4,
#light h5,
#light h6,
#light a {
	color: #000;
}

a:hover {
	color: #007bff !important;
}

.hover:hover {
	color: #007bff !important;
}

/* Layout Fixes */
.row>* {
	padding-left: 0px !important;
}

.css-8ndowl {
	z-index: 1100000 !important;
}

/* Mobile Styles */
@media only screen and (max-width: 767px) {
	.marginMobil {
		margin-left: 30px !important;
		margin-right: 0px;
	}

	.notOnMobil {
		display: none !important;
	}

	.marginItem {
		margin-right: 15px !important;
	}

	.marginTopMobil {
		margin-top: 0px !important;
	}
}

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

	html,
	body,
	#root {
		font-size: 0.867rem !important;
	}
}

@media only screen and (max-width: 599px) {
	.itemHeightMobil {
		max-height: 500px !important;
	}
}

@media only screen and (min-width: 1001px) {
	.notOnDesktop {
		display: none !important;
	}
}

@media only screen and (max-width: 1000px) {
	.notMobil {
		display: none !important;
	}

	.mobil {
		display: block !important;
	}
}

@media only screen and (min-width: 600px) {
	.itemHeightTabletPC {
		max-height: 250px !important;
	}
}