/* Autocomplete Styles */
.ui-autocomplete {
	z-index: 1100;
    max-width: 15rem;
	background-color: var(--custom-white);
	border: 1px solid var(--bs-border-color);
	border-radius: 0;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
	padding: 0.25rem 0;
    border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.ui-menu-item-wrapper {
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	font-size: 0.875rem;
}

.ui-menu-item-wrapper.ui-state-active {
	background-color: var(--sa-primary-color);
	color: var(--custom-white);
	border: 0;
	margin: 0;
}

/* Google Places Autocomplete Styles */
.pac-container {
	z-index: 1100 !important;
	background-color: #fff;
	border: 1px solid #dee2e6;
	border-top: none;
	border-radius: 0 0 0.375rem 0.375rem;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
	font-family: inherit;
	font-size: 0.875rem;
	margin-top: -1px;
}

.pac-item {
	padding: 0.625rem 0.875rem;
	cursor: pointer;
	border-top: 1px solid #f0f0f0;
	line-height: 1.4;
}

.pac-item:first-child {
	border-top: none;
}

.pac-item:hover,
.pac-item-selected {
	background-color: #f8f9fa;
}

.pac-item-query {
	font-size: 0.875rem;
	color: #333;
	font-weight: 500;
}

.pac-matched {
	font-weight: 600;
	color: var(--sa-primary-color, #0d6efd);
}

.pac-icon {
	margin-right: 0.5rem;
	width: 20px;
	height: 20px;
	background-size: contain;
}

.pac-icon-marker {
	background-image: none;
}

.pac-icon-marker::before {
	content: "\f3c5";
	font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", FontAwesome;
	font-weight: 900;
	color: #6c757d;
	font-size: 0.875rem;
}

/* Address field indicator */
.sa-address-autocomplete {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512' fill='%236c757d'%3E%3Cpath d='M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 0.875rem;
	padding-right: 2.25rem;
}

/* Modal-specific adjustments */
.modal .pac-container {
	z-index: 1200 !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
	.pac-container {
		max-width: calc(100vw - 2rem);
	}

	.pac-item {
		padding: 0.75rem;
	}
}
