/* ----------------------------------------------------------------
	Custom CSS

	Add all your Custom Styled CSS here for New Styles or
	Overwriting Default Theme Styles for Better Hanlding Updates
-----------------------------------------------------------------*/

/* Keep theme icon vertically aligned with text */
#current-theme-icon svg {
	display: block;
}

/* ==============================================
   WCAG 2.1 AA Accessibility Improvements
   ============================================== */

/* Enhanced focus indicators for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible {
	outline: 3px solid #6610f2;
	outline-offset: 2px;
}

/* Skip to main content link (hidden but accessible) */
.skip-to-main {
	position: absolute;
	top: -40px;
	left: 0;
	background: #6610f2;
	color: white;
	padding: 8px;
	text-decoration: none;
	border-radius: 0 0 4px 0;
	z-index: 100;
}

.skip-to-main:focus {
	top: 0;
}

/* Improved button focus states */
.btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(102, 16, 242, 0.5);
}

/* Improved contrast for tertiary text when needed */
.text-body-tertiary {
	color: #495057 !important; /* improved from #6c757d */
}

[data-bs-theme="dark"] .text-body-tertiary {
	color: #b0b3b8 !important; /* improved contrast in dark mode */
}

/* Ensure dropdown items have sufficient contrast */
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
	background-color: #e0cffc;
	color: #000;
}

[data-bs-theme="dark"] .dropdown-menu a:hover,
[data-bs-theme="dark"] .dropdown-menu a:focus-visible {
	background-color: #510bc4;
	color: #fff;
}

/* Improve link visibility */
a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* Smooth scroll behavior for reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto !important;
	}
	
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Ensure form elements have proper contrast */
.form-control:focus,
.form-select:focus {
	border-color: #6610f2;
	box-shadow: 0 0 0 0.2rem rgba(102, 16, 242, 0.25);
}

/* Improve navbar link visibility */
.navbar-nav .nav-link {
	position: relative;
	transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus-visible::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	right: 0;
	height: 2px;
	background-color: currentColor;
}

/* Back to top button accessibility */
#back-to-top {
	outline-offset: -3px;
}

#back-to-top:focus-visible {
	outline: 3px solid #6610f2;
}

/* Ensure modal content is accessible */
.modal-content {
	border: 1px solid #dee2e6;
}

.modal-header .btn-close:focus-visible {
	box-shadow: 0 0 0 3px rgba(102, 16, 242, 0.5);
}

/* Screen reader only text */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}



