/* Popup styling */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background-color: #fff;
    /* padding: 20px; */
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    height: 700px;
    position: relative;
}

.popup-content.auto-height {
    height: auto; /* Dynamic height when the form is active */
}

.close-address-popup-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #ffffff;
    color: #333333;
    border: none;
    cursor: pointer;
    z-index: 9999;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

.map-container {
    height: 510px;
    margin-bottom: 15px;
}

#address-map {
    height: 100%;
    border-radius: 5px;
}

.form-container input {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
}

.add-btn {
    padding: 10px 15px;
    background-color: #5cb85c;
    color: #fff;
    border: none;
    cursor: pointer;
}

.next-btn {
    background-color: #007bff;
}

.back-btn {
    background-color: #6c757d;
}

.address-label button {
    margin-right: 5px;
}

.custom-map-control-button {
    background-color: #fff;
    color: grey;
    border: none;
    outline: none;
    padding: 8px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    right: 10px !important;
}

.custom-map-control-button:hover {
    background-color: #ebebeb;
}

.custom-map-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 30px;
    height: 30px;
    /* background-size: cover; */
    background-repeat: no-repeat;
    pointer-events: none; /* Ensure the marker doesn't interfere with map controls */
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns%3D%22http%3A//www.w3.org/2000/svg%22 viewBox%3D%220 0 384 512%22%3E%3Cpath d%3D%22M215.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%22/%3E%3C/svg%3E');
}

/* #address-form-section {
    padding: 20px;
} */

.address-sub-section-place {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.address-input-field {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Ellipsis when text overflows */
    margin-right: 10px;
}
.geo-reverse-location-complete-address{
    display: flex;
}

.search-input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}
.suggestions-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 80%; /* Adjust this based on the parent height */
    width: 95%;
    overflow-y: auto;
    background-color: white;
    /* border-top: none; */
    margin-top: 2px;
    position: absolute; /* Ensure the list stays within the box */
    z-index: 1000; /* Make sure it's on top of other elements */
    box-sizing: border-box; /* Ensure padding and border are included in width/height */

    /* Hide the scrollbar for WebKit browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
}

.suggestions-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.suggestions-list li:hover {
    background-color: #f0f0f0;
}

/* .popup-content {
    padding: 20px;
    max-width: 500px;
    margin: auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
} */
.form-container {
    display: none;
}
.form-container.hidden {
    display: none;
}
.form-container.visible {
    display: block;
}
.add-btn, .address-label-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/* .address-input-field {
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
} */

.search-container {
    padding: 20px;
}

.save_next_main_address{
    padding: 0 20px;
}
#address-map-next {
    width: 100%;
    margin: 0 !important;
}

#search-back-btn, #address-form-back {
    padding-left: 0 !important;
}


#address-form-section {
    /* max-width: 400px; */
    margin: 0 auto;
    padding: 20px;
}

#address-form-section h2, #search-section h2, #address-map-section h2 {
    font-size: 1.5rem;
    color: #333;
}

.alert_container {
    padding: 0 20px;
}

#address-form-section label {
    font-weight: 500;
    color: #666;
}

#address-form-section .form-control, #search-section .form-control, #address-map-section .form-control {
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 12px;
}

#address-form-section .form-control::placeholder {
    color: #aaa;
}

#address-form-section .btn-group-toggle .btn {
    border-radius: 18px !important;
    padding: 4px 12px;
    font-weight: 400;
}

#address-form-section .btn-group-toggle .btn.active {
    /* background-color: #4B0082;
    border-color: #4B0082; */
    color: white;
}

/* #address-form-section .btn-primary {
    background-color: #4B0082;
    border-color: #4B0082;
} */

#address-form-section .btn-primary:hover, #address-form-section .btn-group-toggle .btn:hover {
    color: white;
}
.custom-map-control-button{
    bottom: 105px !important;
}

/* Media query for mobile devices */
@media screen and (max-width: 480px) {
    .popup-content {
        width: 95%;
    }
    .suggestions-list{
        width: 90%;
    }
    body.swal2-toast-shown .swal2-container{
        width: 100% !important;
        z-index: 9999;
    }
    .swal2-container{
        width: 100%;
        display: flex !important;
        align-items: center !important;
    }
}
