/* Autocomplete Fixes for Google Places */

/* Make sure Google autocomplete dropdown is visible and properly positioned */
.pac-container {
    z-index: 10001 !important;
    position: absolute !important;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    pointer-events: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Style autocomplete items for better visibility */
.pac-item {
    padding: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    line-height: 20px !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10002 !important;
}

.pac-item:hover {
    background-color: #f5f5f5 !important;
}

.pac-item-selected,
.pac-item:hover {
    background-color: #e9e9e9 !important;
}

/* Ensure the icon is visible */
.pac-icon {
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px !important;
    margin-top: 5px !important;
}

/* Fix for autocomplete text visibility */
.pac-item-query {
    font-size: 14px !important;
    color: #000 !important;
}

/* Ensure proper spacing for matched text */
.pac-matched {
    font-weight: bold !important;
    color: #1a73e8 !important;
}

/* Fix input field focus states for accessibility */
.mtap-location input[type="text"]:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* Ensure labels are properly associated */
label[for] {
    cursor: pointer;
    font-weight: 600;
}

/* Fix for readonly state styling */
.mtap-location.location-added input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Improve remove button accessibility */
.mtap-location .remove {
    cursor: pointer;
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
}

.mtap-location .remove:hover {
    opacity: 0.7;
}

.mtap-location .remove:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* Ensure proper contrast for error messages */
.field-container.error .error-details {
    color: #d93025;
    font-weight: 500;
}

/* Fix for mobile devices */
@media (max-width: 768px) {
    .pac-container {
        width: 100% !important;
        max-width: calc(100vw - 40px) !important;
        left: 20px !important;
        right: 20px !important;
    }
    
    .pac-item {
        padding: 15px !important;
        font-size: 16px !important;
    }
}