﻿/* Custom Country Dropdown Styling */
.country-dropdown-wrapper {
	position: relative;
}

.country-dropdown-button {
	border: 1px solid #dee2e6;
	border-radius: 0.375rem;
	padding: 0.5rem 0.75rem !important;
	text-align: left;
	background-color: white;
	color: #495057;
	font-weight: normal;
}

.country-dropdown-button:active {
	background-color: lightgray !important;
}

.country-dropdown-button:hover {
	background-color: #f8f9fa;
	border-color: #adb5bd;
	color: #495057;
}

.country-dropdown-button:focus {
	background-color: white;
	border-color: #80bdff;
	box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.country-dropdown-button.show {
	background-color: #f8f9fa;
	border-color: #80bdff;
	color: #495057;
}

.country-dropdown-display {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.country-dropdown-display .fi {
	font-size: 1.2em;
}

.country-dropdown-menu {
	max-height: 400px;
	overflow-y: auto;
	overflow-x: hidden;
	min-width: 300px !important;
	border: 1px solid #dee2e6;
	border-radius: 0.375rem;
	padding: 0 !important;
}

.country-dropdown-search {
	padding: 0.5rem;
	border-bottom: 1px solid #dee2e6;
	background-color: #f8f9fa;
}

.country-dropdown-search input {
	border-radius: 0.25rem;
	border: 1px solid #dee2e6;
}

.country-dropdown-search input:focus {
	border-color: #80bdff;
	box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.country-dropdown-list {
	max-height: 300px;
	overflow-y: auto;
}

.country-option {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 1rem !important;
	color: #495057;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease-in-out;
}

.country-option:hover {
	background-color: #f8f9fa;
	color: #495057;
}

.country-option.active {
	background-color: #e7f1ff;
	color: #0c63e4;
	font-weight: 500;
}

.country-option .flag-icon {
	display: inline-flex;
	align-items: center;
	font-size: 1.3em;
	min-width: 1.5em;
}

.country-option .country-name {
	flex-grow: 1;
	overflow: hidden;
	text-overflow: ellipsis;
}

.country-dropdown-error {
	color: #dc3545;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* Scrollbar styling for dropdown list */
.country-dropdown-list::-webkit-scrollbar {
	width: 6px;
}

.country-dropdown-list::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.country-dropdown-list::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

.country-dropdown-list::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.country-dropdown-button.dropdown-toggle {
	position: relative;
}

.country-dropdown-button.dropdown-toggle::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 0.75rem;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid #495057;
	transform: translateY(-50%);
}
