/* Navigation Menu Icon Styles */

.menu-icon {
	position: absolute;
	right: 20px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	font-family: 'Heebo', sans-serif;
}

.menu-icon img {
	border-radius: 0px;
	width: auto;
	height: 4em;
	transition: transform 0.3s ease;
}

.menu-icon:hover, .menu-icon:active, .menu-icon:focus {
	background-color: transparent;
}

.menu-icon:hover img {
	transform: rotate(360deg);
}

/* Navigation Menu Overlay */
.nav-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-menu-overlay.open {
	opacity: 1;
	visibility: visible;
}

/* Navigation Menu Panel */
.nav-menu {
	position: fixed;
	top: 0;
	right: -400px;
	width: 400px;
	max-width: 90vw;
	height: 100vh;
	background: white;
	z-index: 999;
	transition: right 0.3s ease;
	overflow-y: auto;
	border-radius: 8px;
	box-shadow: 0 4px 6px 0 #171717;

	min-height: 100vh;
    background-image: url(/src/lib/assets/nav-menu-background.png);
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.nav-menu.open {
	right: 0;
}

/* Menu Header */
.nav-menu-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
	background: #F3F6FA;
	box-shadow: 0px 3px 4px 3px #0000001a;
}

.nav-menu-header h2 {
	margin: 0;
}

.close-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	font-size: 2rem;
	font-family: 'Heebo', sans-serif;
}

.close-btn:hover {
    background-color: #c00;
	transform: rotate(360deg);
}

/* Menu Content */
.nav-menu-content {
	padding: 20px;
}

.search-section {
	margin-bottom: 40px;
}

.candidate-search-section {
	padding-top: 25px;
	border-top: 1px solid #666666;
}

.candidate-search-section .search-input-group {
	position: relative;
}

.candidate-options {
	position: absolute;
	top: calc(100% - 0.5rem);
	left: 0;
	right: 0;
	margin-top: 0.2rem;
	z-index: 10;
	max-height: 300px;
	overflow-y: auto;
	background: #fff;
	border: 2px solid #233166;
	border-radius: 16px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.candidate-options[hidden] {
	display: none;
}

.candidate-alpha-divider {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 5px 14px;
	background: #F3F6FA;
	border-bottom: 1px solid #ccd5e0;
	color: #233166;
	font-family: 'Heebo', sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
}

.candidate-option {
	display: block;
	width: 100%;
	padding: 10px 14px;
	background: #fff;
	border: 0;
	border-bottom: 1px solid #e7e7e7;
	border-radius: 0;
	color: #111;
	text-align: left;
	font-family: 'Heebo', sans-serif;
	cursor: pointer;
}

.candidate-option:hover,
.candidate-option:focus,
.candidate-option.highlighted {
	background: #eaf3f8;
	color: #233166;
	outline: none;
}

.search-section h3 {
	margin: 0 0 15px 0;
}

.search-input-group input,
.search-input-group select {
	width: 100%;
	padding: 12px;
	border: 3px solid #0073aa;
	border-radius: 50px !important;
	box-sizing: border-box;
	font-family: 'Heebo', sans-serif;
    margin-bottom: 0.5rem;
	transition: all 0.2s;

	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%230073aa' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 20px;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 45px;

	background-color: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);


}

.search-input-group select option[value=""] {
	color: #5C6B7A;
}

.search-input-group select:invalid {
	color: #5C6B7A;
}

.search-input-group input:focus,
.search-input-group input:hover,
.search-input-group select:focus,
.search-input-group select:hover {
	outline: none;
    border: 3px solid #233166;
    box-shadow: 
    inset 0 1px 2px rgba(35, 50, 102, 0.07),
    inset 0 2px 4px rgba(35, 50, 102, 0.07),
    inset 0 4px 8px rgba(35, 50, 102, 0.07),
    inset 0 8px 16px rgba(35, 50, 102, 0.07),
    inset 0 16px 32px rgba(35, 50, 102, 0.07),
    inset 0 32px 64px rgba(35, 50, 102, 0.07);
}

#candidate-search-input::-webkit-calendar-picker-indicator {
	display: none !important;
}

/* Search Buttons */
.search-btn {
	width: 100%;
	padding: 12px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: 'Heebo', sans-serif;
}

.search-btn:disabled {
	background: #ccc;
	box-shadow: 0px 0px 0px 0px #ccc;
	cursor: not-allowed;
}

.candidate-search-status {
	min-height: 1.5em;
	margin: -8px 4px 8px;
	color: #5C6B7A;
	font-family: 'Heebo', sans-serif;
	font-size: 0.875rem;
}

.candidate-search-status.candidate-race-match {
	font-style: italic;
}

/* Search Results */
.search-results {
	margin-top: 15px;
	max-height: 300px;
	overflow-y: auto;
}

.search-result-item {
	padding: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	margin-bottom: 8px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.search-result-item:hover {
	background: #f5f5f5;
}

.search-result-item strong {
	display: block;
	margin-bottom: 4px;
	color: #007bff;
	font-family: "Publico Roman", "Georgia", "serif";
}

.search-result-item small {
	color: #666;
	font-family: "Publico Roman", "Georgia", "serif";
}

/* Layout Adjustments */
.middle-header-contain .wrapper {
	position: relative;
}

/* Prevent site-description overlap with menu icon */
@media (max-width: 830px) and (min-width: 630px) {
	.site-description {
		max-width: calc(100% - 100px);
		padding-right: 10px;
	}
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
	.nav-menu {
		width: 100%;
		right: -100%;
	}
	
	.menu-icon {
		right: 0px;
	}

    .menu-icon img {
        height: 3em;
    }
}
