input[type='checkbox'] {
    width: 20px;
    height: 20px;
}

input[type='checkbox']:focus-visible {
    outline-offset: 0;
}

.close-icon {
    width: 30px;
    height: 30px;
}

.close-btn {
    background-color: transparent;
    width: 40px;
    height: 40px;
    display: flex;
    padding: 0;
    justify-content: center;
    align-items: center;
    border-radius: 50% !important
}

.close-btn:hover {
    background-color: rgb(241, 241, 244) !important;
    border: 1px solid transparent !important;
}

.more-btn {
    display: none !important;
}

.type-btn {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.btn-outline-secondary:hover {
    background-color: transparent !important;
    color: #6c757d !important;
}

.btn-outline-secondary.focus, .btn-outline-secondary:focus {
    box-shadow: none !important;
}

.toggle-content {
    width: 184px;
    display: none;
    z-index: 2;
    position: absolute;
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
    border-radius: 0 0 4px 4px;
    padding: 8px;
    color: rgba(0, 0, 0, 0.86);
    background: #fff;
    cursor: pointer;
}

.visible {
    display: block;
}

.toggle-content:hover {
    cursor: pointer;
}

.modal-filters ul, .mobile-filters-container ul {
    width: 100%;
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    max-height: 200px;
    padding-right: 10px;
    margin-bottom: 0 !important;
}

.list-item > label {
    display: flex;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
}

.list-item:hover, .list-item > label:hover {
    cursor: pointer
}

.list-item > label > input {
    margin-right: 5px;
}

.list-item::before {
    background-color: rgba(0, 0, 0, .86);
    bottom: 0;
    content: "";
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
}

.list-item:hover {
    opacity: 0.9;
    cursor: pointer !important;
}

.filters-container {
    min-height: 79px;
    position: fixed;
    left: 0;
    padding: 10px 20px;
    width: 100%;
    z-index: 1050;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgb(209, 209, 213);
    border-top: 1px solid rgb(209, 209, 213);
    background-color: #fff;
    top: 66px;
}

.filter-input,
.filter-select {
    padding: 8px;
    font-size: 14px;
    flex: 1;
    max-width: 200px;
}

.filter-select > button {
    width: 100%;
}

.price-filter-container {
    display: flex;
    gap: 5px;
}

/* Modal Filters */
.modal-filters {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1000;
    transition: bottom 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-filters.show-modal {
    bottom: 0;
}

.custom-modal-header {
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-filters-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.filter-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.filter-heading {
    color: #495057;
    font-weight: 600;
}

.filter-input {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    width: 100%;
}

.filter-select {
    width: 100%;
}

.toggle-content-mobile {
    width: 100%;
}

.toggle-content-mobile ul {
    padding-left: 0;
    margin-bottom: 0;
}

.toggle-content-mobile .list-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
}

.toggle-content-mobile .list-item:last-child {
    border-bottom: none;
}

.actions-container {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    position: sticky;
    bottom: 0;
}

.actions {
    width: 100%;
}

/* Highlighted marker for map */
.highlighted-marker {
    border: 3px solid #007bff !important;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5) !important;
    z-index: 1000 !important;
    transform: scale(1.2) !important;
    transition: all 0.3s ease !important;
}

/* Make sure mobile filters don't overlap with bottom nav */
@media (max-width: 767.98px) {
    .modal-filters {
        padding-bottom: 60px; /* Add padding to accommodate bottom navbar */
    }
}

/*mobile styles*/
.modal-filters {
    background-color: #fff;
    position: absolute;
    display: none;
    flex-direction: column;
}

.custom-modal-header {
    padding: 20px !important;
    border-bottom: 1px solid rgb(209, 209, 213);
}

.modal-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
}

.show-modal {
    z-index: 9999999;
    animation: 0.2s ease-out 0s 1 normal none running animate;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    position: fixed;
}

.mobile-filters-container {
    margin-top: 50px;
}

.actions-container {
    margin-top: auto;
    border-top: 1px solid rgb(209, 209, 213);
}

.actions {
    padding: 20px;
}

.navbar {
    z-index: 9999 !important;
}

.pac-container {
    z-index: 10000;
}

@keyframes animate {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@media (max-width: 768px) {
    .search-form .form-control {
        font-size: 1rem !important;
    }
}

@media screen and (max-width: 767px) {
    .more-btn {
        display: inline-block !important;
    }

    #price-min-filter, #price-max-filter, #ad-type-filter {
        display: none !important;
    }
}
