.modal{
    padding:0;
    margin:0;
}
.modal-dialog{
    overflow-y: initial !important
}
.modal-body{
    max-height: 65vh;
    overflow-y: auto;
}

.radio-under{
	width:80%;
	position: relative !important;
	margin:0 !important;
}

.clickable{
    cursor: pointer;
}

html, body{
    height:100%;
    overflow:hidden;
}

.wrapper{
    overflow:hidden !important;
    height:100%;
}

.main-header{
    position:fixed;
    width:100%;
    z-index:1030;
}

.main-sidebar{
    position:fixed;
    height:100%;
    z-index:1020;
    padding-top:50px;
}

.content-header{
    position:sticky;
    top:0;
    z-index:1000;
    background:#ecf0f5 !important;
    padding:8px 15px;
    border-bottom:1px solid #ddd;
    box-shadow:0 2px 4px rgba(0,0,0,.08);
}

.content-wrapper{
    min-height:0 !important;
    margin-top:50px;
    height:calc(100vh - 50px);
    overflow-y:auto;
    padding-bottom:51px;
}

.main-footer{
    position:fixed;
    bottom:0;
    width:100%;
    z-index:1010;
}

.content{
	min-height:0 !important;
}

#map{
    width: 100% !important;
}

#pac-input{
    left: 200px !important;
    top: 10px !important;
    width: 200px !important;
    height: 40px !important;
}

#messages { list-style-type: none; margin: 0; padding: 0; max-height:60vh; overflow: auto}
/*#messages row { padding: 5px 10px; }*/
#messages .row:nth-child(odd) { background: #eee; }

.wrap{
    overflow-wrap: anywhere;
}

.row{
    max-width:100%;
    margin:0;
    padding:0;
}

#infoWindow {
    width: 200px;
}

tr td{
    display: table-cell !important;
    vertical-align: middle !important;
    float: none;
}

.filters-active{
    background:#e8891a !important;
    border-color:#d47a12 !important;
    color:#fff !important;
}
.filters-active:hover,.filters-active:focus{
    background:#d47a12 !important;
}

.amenity-bubble{
    display:inline-block;
    background:#e8f4fd;
    color:#1a73e8;
    border:1px solid #b8daff;
    border-radius:12px;
    padding:1px 7px;
    font-size:10px;
    white-space:nowrap;
}

.amenity-filter-bubble{
    display:inline-block;
    background:#f0f0f0;
    color:#555;
    border:1px solid #ccc;
    border-radius:14px;
    padding:4px 12px;
    font-size:12px;
    cursor:pointer;
    user-select:none;
    transition:all .15s;
}
.amenity-filter-bubble:hover{
    background:#e0e0e0;
}
.amenity-filter-bubble.active{
    background:#1a73e8;
    color:#fff;
    border-color:#1a73e8;
}
.amenity-filter-bubble.active.amenity-or{
    background:#e8891a;
    border-color:#e8891a;
}
.amenity-filter-bubble.active.amenity-display{
    background:#34a853;
    border-color:#34a853;
}

#photoGalleryOverlay{
    display:none;
    position:fixed;
    top:0;left:0;right:0;bottom:0;
    background:rgba(0,0,0,.85);
    z-index:10000;
    overflow-y:auto;
    padding:20px;
}
#photoGalleryOverlay .gallery-close{
    position:fixed;
    top:12px;right:20px;
    color:#fff;
    font-size:32px;
    cursor:pointer;
    z-index:10002;
    background:rgba(0,0,0,.5);
    border:none;
    border-radius:50%;
    width:40px;height:40px;
    line-height:36px;
    text-align:center;
}
#photoGalleryContent{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
    gap:8px;
}
.gallery-category{
    grid-column:1 / -1;
}
.gallery-cat-title{
    color:#fff;
    font-size:16px;
    margin:16px 0 8px;
    padding-bottom:4px;
    border-bottom:1px solid rgba(255,255,255,.3);
}
.gallery-cat-title:first-child{
    margin-top:0;
}
.gallery-cat-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
    gap:8px;
}
#photoGalleryOverlay img.gallery-thumb{
    width:100%;
    height:200px;
    object-fit:cover;
    border-radius:6px;
    cursor:pointer;
    transition:opacity .15s;
}
#photoGalleryOverlay img.gallery-thumb:hover{
    opacity:.8;
}
.gallery-thumb-labeled{
    position:relative;
    width:100%;
}
.gallery-thumb-label{
    position:absolute;
    top:0;left:0;right:0;
    background:rgba(0,0,0,.6);
    color:#fff;
    font-size:12px;
    font-weight:600;
    padding:4px 8px;
    text-align:center;
    pointer-events:none;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    border-radius:6px 6px 0 0;
}
/* Zoomed image overlay */
#photoGalleryZoom{
    display:none;
    position:fixed;
    top:0;left:0;right:0;bottom:0;
    z-index:10001;
    background:rgba(0,0,0,.95);
    overflow:auto;
}
#photoGalleryZoom.active{
    display:block;
}
#photoGalleryZoom .zoom-img-wrap{
    min-height:100vh;
    min-width:100vw;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
    cursor:zoom-out;
}
#photoGalleryZoom img#photoGalleryZoomImg{
    max-width:95vw;
    max-height:95vh;
    object-fit:contain;
    border-radius:4px;
    cursor:default;
    transition:max-width .12s ease, max-height .12s ease;
}
#photoGalleryZoom .zoom-nav{
    position:fixed;
    top:50%;
    transform:translateY(-50%);
    background:rgba(0,0,0,.5);
    color:#fff;
    border:none;
    border-radius:50%;
    width:48px;
    height:48px;
    font-size:22px;
    cursor:pointer;
    z-index:10003;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
}
#photoGalleryZoom .zoom-nav:hover{
    background:rgba(0,0,0,.8);
}
#photoGalleryZoom .zoom-nav.zoom-prev{ left:18px; }
#photoGalleryZoom .zoom-nav.zoom-next{ right:18px; }
#photoGalleryZoom .zoom-nav[disabled]{
    opacity:.3;
    cursor:not-allowed;
}
#photoGalleryZoom .zoom-controls{
    position:fixed;
    bottom:18px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0,0,0,.65);
    border-radius:24px;
    padding:6px 14px;
    display:flex;
    align-items:center;
    gap:8px;
    color:#fff;
    font-size:13px;
    z-index:10003;
}
#photoGalleryZoom .zoom-controls button{
    background:transparent;
    border:none;
    color:#fff;
    font-size:16px;
    cursor:pointer;
    width:32px;
    height:32px;
    border-radius:50%;
}
#photoGalleryZoom .zoom-controls button:hover{
    background:rgba(255,255,255,.15);
}
#photoGalleryZoom #photoZoomLevel{
    min-width:46px;
    text-align:center;
    font-weight:600;
}

/* Grid View - Cards Mode */
.grid-cards{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
    gap:16px;
    padding:10px 0;
}
.grid-card{
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    overflow:hidden;
    transition:box-shadow .15s;
}
.grid-card:hover{
    box-shadow:0 2px 12px rgba(0,0,0,.12);
}
.grid-card-img-wrap{
    width:100%;
    height:180px;
    overflow:hidden;
    background:#f5f5f5;
}
.grid-card-img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.grid-card-noimg{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:40px;
    color:#ccc;
}
.grid-card-body{
    padding:10px 12px;
}
.grid-card-title{
    font-size:14px;
    font-weight:600;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    margin-bottom:2px;
}
.grid-card-price{
    font-size:16px;
    font-weight:700;
    color:#222;
    margin-bottom:2px;
}
.grid-card-details{
    font-size:12px;
    color:#666;
    margin-bottom:4px;
}
.grid-card-amenities{
    display:flex;
    flex-wrap:wrap;
    gap:3px;
    margin-bottom:6px;
}
.grid-card-actions{
    display:flex;
    flex-wrap:wrap;
    gap:6px 6px;
    align-items:center;
}

/* Grid View - Rows Mode */
.grid-rows{
    display:flex;
    flex-direction:column;
    gap:12px;
    padding:10px 0;
}
.grid-row-item{
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
}
.grid-row-images-wrap{
    overflow:hidden;
    border-radius:0 0 8px 8px;
}
.grid-row-header{
    padding:10px 14px;
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    border-bottom:1px solid #eee;
    position:sticky;
    top:47px;
    z-index:10;
    background:#fff;
    box-shadow:0 2px 4px rgba(0,0,0,.06);
    border-radius:8px 8px 0 0;
}
.grid-row-title{
    font-size:14px;
    font-weight:600;
    max-width:300px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.grid-row-price{
    font-size:16px;
    font-weight:700;
    color:#222;
}
.grid-row-details{
    font-size:12px;
    color:#666;
}
.grid-row-amenities{
    display:inline-flex;
    flex-wrap:wrap;
    gap:3px;
}
.grid-row-categories{
    background:#f5f5f5;
    border-radius:0 0 8px 8px;
    overflow:hidden;
}
.grid-row-item > .grid-row-images-wrap:last-child{
    border-radius:0 0 8px 8px;
}
.grid-row-cat{
    border-bottom:1px solid #ddd;
}
.grid-row-cat:last-child{
    border-bottom:none;
}
.grid-row-cat-title{
    padding:4px 10px;
    font-size:11px;
    font-weight:600;
    color:#555;
    background:#eee;
}
.grid-row-images{
    display:flex;
    overflow-x:auto;
    gap:4px;
    padding:0;
    background:#f5f5f5;
}
.grid-row-img{
    height:220px;
    min-width:220px;
    object-fit:cover;
    cursor:pointer;
    flex-shrink:0;
    transition:opacity .15s;
}
.grid-row-img:hover{
    opacity:.85;
}
.grid-row-collapse-btn{
    flex-shrink:0;
    width:28px;
    height:28px;
    border-radius:50%;
    border:1.5px solid #d0d0d0;
    background:#f7f7f7;
    color:#555;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    padding:0;
    transition:background .15s, border-color .15s, box-shadow .15s;
    box-shadow:0 1px 3px rgba(0,0,0,.08);
    outline:none;
}
.grid-row-collapse-btn:hover{
    background:#e8e8e8;
    border-color:#b0b0b0;
    box-shadow:0 2px 6px rgba(0,0,0,.13);
}
.grid-row-collapse-btn i{
    transition:transform .28s cubic-bezier(.4,0,.2,1);
    font-size:12px;
    line-height:1;
}
.grid-row-item.collapsed .grid-row-collapse-btn i{
    transform:rotate(180deg);
}
/* Animated body */
.grid-row-body{
    overflow:hidden;
    max-height:5000px;
    transition:max-height .35s cubic-bezier(.4,0,.2,1), opacity .3s ease;
    opacity:1;
}
.grid-row-item.collapsed .grid-row-body{
    max-height:0;
    opacity:0;
    transition:max-height .3s cubic-bezier(.4,0,.2,1), opacity .2s ease;
}
.grid-row-item.collapsed .grid-row-header{
    border-radius:8px;
    border-bottom:none;
}
/* Single-pic combined row: image with overlaid category label */
.grid-row-img-labeled{
    position:relative;
    flex-shrink:0;
    display:inline-flex;
}
.grid-row-img-label{
    position:absolute;
    top:6px;
    left:0;
    right:0;
    text-align:center;
    background:rgba(0,0,0,.52);
    color:#fff;
    font-size:11px;
    font-weight:600;
    padding:2px 6px;
    pointer-events:none;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:100%;
    letter-spacing:.01em;
}

/* Filters Modal */
.filters-modal-header{
    background:#f8f9fa;
    border-bottom:1px solid #e0e0e0;
    padding:14px 20px;
}
.filters-modal-header .modal-title{
    font-size:18px;
    font-weight:600;
    color:#333;
}
.filters-modal-header .modal-title i{
    margin-right:6px;
    color:#666;
}
.filters-modal-body{
    padding:16px 20px !important;
}
.filters-modal-footer{
    display:flex;
    justify-content:space-between;
    padding:12px 20px;
    background:#f8f9fa;
    border-top:1px solid #e0e0e0;
}
.filter-section{
    margin-bottom:16px;
    padding-bottom:16px;
    border-bottom:1px solid #f0f0f0;
}
.filter-section:last-of-type{
    border-bottom:none;
    margin-bottom:8px;
    padding-bottom:0;
}
.filter-section-compact{
    margin-bottom:10px;
    padding-bottom:10px;
}
.filter-label{
    display:block;
    font-size:13px;
    font-weight:600;
    color:#444;
    margin-bottom:8px;
}
.filter-label i{
    width:16px;
    text-align:center;
    margin-right:4px;
    color:#888;
}
.filter-sublabel{
    display:block;
    font-size:12px;
    font-weight:600;
    color:#666;
    margin-bottom:4px;
}
.filter-hint{
    font-weight:400;
    color:#999;
}
.filter-row{
    display:flex;
    align-items:center;
    gap:8px;
}
.filter-row-thirds{
    gap:12px;
}
.filter-separator{
    color:#aaa;
    font-size:16px;
    flex-shrink:0;
}
.filter-input{
    display:block;
    width:100%;
    height:34px;
    padding:6px 10px;
    font-size:13px;
    color:#333;
    background:#fff;
    border:1px solid #d0d0d0;
    border-radius:6px;
    transition:border-color .15s, box-shadow .15s;
    outline:none;
    box-sizing:border-box;
}
.filter-input:focus{
    border-color:#80b4f1;
    box-shadow:0 0 0 3px rgba(26,115,232,.12);
}
.filter-input::placeholder{
    color:#bbb;
}
.filter-input-full{
    width:100%;
}
.filter-field{
    flex:1;
    min-width:0;
}
.filter-field-label{
    display:block;
    font-size:11px;
    color:#888;
    margin-bottom:3px;
}
.filter-checkbox-label{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    color:#555;
    cursor:pointer;
    margin-top:6px;
}
.filter-checkbox-label input[type="checkbox"]{
    margin:0;
    width:15px;
    height:15px;
    accent-color:#1a73e8;
}

/* Draw Shape Modal buttons */
.draw-shape-btn {
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.draw-shape-btn:hover, .draw-shape-btn:focus {
    border-color: #2196F3 !important;
    background: #e3f2fd !important;
    box-shadow: 0 2px 8px rgba(33,150,243,.18);
    outline: none;
}