
/* Native Ai HOMES application styled *inside* the new AI CARD-inspired shell.
   Its DOM and original event handlers remain intact. */
:root{--ai-shell-height:0px}
body.ai2-native-embedded{--ai-shell-height:0px!important;--ai2-h:0px!important;background:#f4f9fc!important;color:#193e59!important}
body.ai2-native-embedded:not(:fullscreen){padding-top:0!important}
body.ai2-native-embedded>#ai2Header,
body.ai2-native-embedded>#ai2Dock,
body.ai2-native-embedded>#aiSiteHeader,
body.ai2-native-embedded>.ai-top-home,
body.ai2-native-embedded>header:not(#desktopHomeMenu):not(.meter-top),
body.ai2-native-embedded #ai2Header,
body.ai2-native-embedded #ai2Dock{display:none!important}
body.ai2-native-embedded.ai-site-shell{padding-top:0!important}
body.ai2-native-embedded.ai-desktop-home{padding-top:46px!important}
body.ai2-native-embedded.ai-desktop-home>#globalPriceTicker{top:0!important;inset:0 0 auto!important}
body.ai2-native-embedded.ai-desktop-home main{height:100%!important}
body.ai2-native-embedded #desktopHomeControls,body.ai2-native-embedded #desktopHomeMenuButton{display:none!important}
body.ai2-native-embedded .main-map-navigation,
body.ai2-native-embedded .countrybar,
body.ai2-native-embedded .map-tools{border-color:#dbe8ee!important}
body.ai2-native-embedded .mapwrap{max-width:100%!important}
body.ai2-native-embedded .prop-card,
body.ai2-native-embedded .ai-card,
body.ai2-native-embedded .directory-card,
body.ai2-native-embedded .professional-brand,
body.ai2-native-embedded .property-tile,
body.ai2-native-embedded .bc-card,
body.ai2-native-embedded .area-card{border:1px solid #d8e6ee!important;border-radius:18px!important;box-shadow:0 4px 16px rgba(25,64,91,.075)!important}
body.ai2-native-embedded button,
body.ai2-native-embedded select{border-radius:12px}
body.ai2-native-embedded :is(.properties-header,.directory-header,.ai-page-heading,.ws-heading,.prop-heading) h1{color:#1b4c6c;font-size:clamp(24px,3vw,30px)!important;font-weight:700!important}
body.ai2-native-embedded :is(.ai-shell-page,.prop-shell,.directory-main,.ws-panel){background:#f4f9fc}
body.ai2-native-embedded .prop-map,body.ai2-native-embedded #directoryMap{border:1px solid #d2e4ef;border-radius:16px}
body.ai2-native-embedded .price-value,body.ai2-native-embedded .property-price{font-weight:800}
body.ai2-native-embedded .ai-guide-dialog :is(button,select){border-radius:12px}
body.ai2-native-embedded .ar-card{max-width:min(255px,47vw)}
body.ai2-native-embedded .ai-tag,
body.ai2-native-embedded .prop-tag{border-radius:9px}
body.ai2-native-embedded .bc-photo,body.ai2-native-embedded .broker-photo{object-fit:cover}
body.ai2-native-embedded .professional-logo,body.ai2-native-embedded .agency-logo,body.ai2-native-embedded .developer-logo{object-fit:contain}
@media(max-width:700px){
 body.ai2-native-embedded.ai-desktop-home{padding-top:0!important}
 body.ai2-native-embedded :is(.prop-shell,.directory-main,.ai-shell-page){padding:14px!important}
 body.ai2-native-embedded .prop-grid{grid-template-columns:1fr!important}
 body.ai2-native-embedded :is(.prop-card,.ai-card,.directory-card){font-size:14px}
 body.ai2-native-embedded .prop-card .price{font-size:24px}
}


/* Exactly one visible map toolbar: AI HOME2 now owns the quick controls.
   The original market-view and fullscreen DOM remains alive for all services
   and can still be called through the frame's original APIs. */
body.ai2-native-embedded.ai-desktop-home .map-stage>[data-market-view-tabs="map"],
body.ai2-native-embedded.ai-desktop-home .map-stage>#openPropertyAR,
body.ai2-native-embedded.ai-desktop-home .map-stage>#fullscreen,
body.ai2-native-embedded .map-stage>#desktopHomeFilter,
body.ai2-native-embedded #desktopHomeFilter,
body.ai2-native-embedded .map-stage>.market-advanced{display:none!important}
body.ai2-native-embedded.ai-desktop-home .map-stage .map-status{display:none!important}
/* Preserve the authentic indexed prices, ten-color area fills, map pins and
   clusters, and do not alter the user-controlled basemap zoom thresholds. */
/* Leaflet/MapLibre retain their OWN touch-action semantics for map gestures. */
@media(max-width:700px){
 body.ai2-native-embedded .map-stage>[data-market-view-tabs="map"]{display:none!important}
 body.ai2-native-embedded .map-stage>#openPropertyAR{display:none!important}
 body.ai2-native-embedded .map-stage>#fullscreen{display:none!important}
 body.ai2-native-embedded .map-stage>.maptop{display:none!important}
}


/* ---- The same visual system across every ORIGINAL service page ---- */
body.ai2-native-embedded{
 --ai-modern-stroke:#d7e5ed;--ai-modern-deep:#1d4f72;
 --ai-modern-mist:#f3f9fc;--ai-modern-sky:#e5f3fb;
 --ai-modern-radius:17px;
 color:#284d65!important;
}
body.ai2-native-embedded :is(button,input,select,textarea){
 font-family:Dubai,"Segoe UI",Arial,sans-serif!important;
 font-size:clamp(13px,1.2vw,16px)!important;
}
body.ai2-native-embedded :is(input,select,textarea):not([type=checkbox]):not([type=radio]){
 min-height:43px!important;
 padding:8px 11px!important;
 border-radius:12px!important;
 border:1px solid #cadde9!important;
 color:#1c4868!important;
 background:#fff!important;
 box-shadow:none!important;
}
body.ai2-native-embedded :is(button,a):focus-visible{outline:3px solid #60b4de!important;outline-offset:2px!important}
body.ai2-native-embedded :is(button,a):hover{transition:background-color .16s,border-color .16s}
body.ai2-native-embedded :is(.prop-intro,.ai-page-heading,.ws-heading,.hd-heading){
 display:flex;align-items:center;justify-content:space-between;gap:14px;
 border:1px solid #d9e7ef;border-radius:18px;background:#fffffff0;
 padding:16px 19px;box-shadow:0 4px 17px #12466a0b;
}
body.ai2-native-embedded :is(.prop-intro,.ai-page-heading,.ws-heading,.hd-heading) h1{
 margin:2px 0 5px;font-weight:700;font-size:clamp(24px,2.5vw,30px);line-height:1.3;color:#214c6b;
}
body.ai2-native-embedded :is(.prop-kicker,.ws-eyebrow,.hd-eyebrow){font-size:11px!important;font-weight:700;letter-spacing:1px;color:#5a83a0}
body.ai2-native-embedded :is(.prop-description,.hd-heading p,.ai-page-heading p){font-size:13px!important;line-height:1.55;color:#6e8798}
body.ai2-native-embedded :is(.prop-filters,.directory-filters,.ai-tools,.hd-filters,.cal-filters,.ws-toolbar){
 border:1px solid var(--ai-modern-stroke)!important;
 border-radius:17px!important;padding:12px!important;
 background:#fffffff4!important;box-shadow:0 3px 13px #16476b0a!important;
 gap:9px!important;
}
body.ai2-native-embedded :is(.prop-filters,.directory-filters,.ai-tools,.hd-filters,.cal-filters,.ws-toolbar) label{
 color:#597b91;font-size:12px!important;font-weight:600!important;line-height:1.5
}
body.ai2-native-embedded :is(.prop-toolbar,.directory-view,.directory-nearby,.ws-actions,.cal-toolbar){
 border-color:#dbe7ef!important;background:#fafcff!important;border-radius:14px!important;padding:9px!important;
}
body.ai2-native-embedded :is(.prop-card,.dir-card,.ai-card,.ws-card,.hd-card,.event-card,.bc-card,.property-tile){
 border:1px solid #d8e5ed!important;
 border-radius:19px!important;
 background:#fff!important;box-shadow:0 3px 16px #153d590e!important;
 overflow:hidden;
}
body.ai2-native-embedded :is(.prop-card,.dir-card,.ai-card,.ws-card,.hd-card) button{
 border-radius:12px!important;font-weight:600;color:#23597e
}
body.ai2-native-embedded :is(.prop-price,.ws-price,.hd-price,.property-price){
 font-weight:800!important;color:#1d4d70!important;font-variant-numeric:tabular-nums;
}
body.ai2-native-embedded :is(.prop-card-content,.hd-body,.dir-card-info,.ws-card){
 padding:clamp(12px,1.5vw,18px)!important;
}
body.ai2-native-embedded :is(.prop-card-actions,.dir-card-actions,.hd-actions,.ai-card-actions){
 display:flex;gap:7px;flex-wrap:wrap;align-items:center;
}
body.ai2-native-embedded :is(.prop-card-actions,.dir-card-actions,.hd-actions) button{
 min-height:38px;border-radius:11px!important;
}
/* Property results keep their native brochure/share/agent/contact handlers. */
body.ai2-native-embedded .prop-results{gap:14px!important}
body.ai2-native-embedded .prop-photo-wrap img,
body.ai2-native-embedded .prop-image img{object-fit:cover}
body.ai2-native-embedded :is(.prop-post,.prop-professional,.prop-investment){
 border:1px solid #dbe9f0!important;background:#fff!important;border-radius:16px!important;
}
body.ai2-native-embedded .prop-professional .identity-visual img{object-fit:contain}
/* Business cards are vertically readable and branded to their OWNER, not Ai HOMES. */
body.ai2-native-embedded #dirRows .dir-card{min-height:0!important}
body.ai2-native-embedded .dir-card-top{display:flex;align-items:center;gap:11px}
body.ai2-native-embedded .dir-avatar,body.ai2-native-embedded .dir-photo{border-radius:13px;object-fit:cover}
body.ai2-native-embedded :is(.directory-legend,.directory-note){border-radius:12px}
body.ai2-native-embedded :is(.dir-profile,.ai-public-profile,.professional-brand){
 border:1px solid #d9e6ef!important;border-radius:19px!important;background:#fff!important;
 box-shadow:0 3px 15px #183f580d!important;
}
body.ai2-native-embedded :is(.directory-main,.prop-shell,.ai-shell-page,#workspace,.hd-page){
 max-width:1480px;margin-inline:auto;
}
/* Agents' CRM: contact and booking views keep native Supabase save operations. */
body.ai2-native-embedded #workspace{padding:clamp(12px,2vw,26px)!important}
body.ai2-native-embedded #wsTabs{
 display:flex;flex-wrap:wrap;gap:7px;padding:7px;border-radius:16px;
 border:1px solid #dbe7ed;background:#fff;
}
body.ai2-native-embedded #wsTabs button{
 min-height:42px;padding:8px 16px;border-radius:11px!important;
 font-size:14px!important;font-weight:700;
}
body.ai2-native-embedded #wsTabs button[aria-selected=true],
body.ai2-native-embedded #wsTabs button.active{
 background:#235d83!important;color:#fff!important;
}
body.ai2-native-embedded :is(.ws-form,.ws-panel,.ws-metrics,.ws-map){
 border-radius:16px!important;border-color:#d9e6ef!important;
}
/* Developer and project identity/white-label logos preserve aspect ratio. */
body.ai2-native-embedded :is(.developer-logo,.agency-logo,.bc-agency-logo,.bc-developer-logo,.professional-logo,img[data-logo]){
 object-fit:contain!important;
}
body.ai2-native-embedded :is(.broker-avatar,.agent-avatar,.bc-agent-photo,.dir-avatar,.prop-post-avatar){
 object-fit:cover!important;
}
/* Native Ai GUIDE editor: don't change density logic or print/PDF assets. */
body.ai2-native-embedded .ai-guide-dialog .guide-toolbar{
 border-radius:15px!important;border-color:#cfdfeb!important;background:#f8fbfe!important;
}
body.ai2-native-embedded #aiGuideMagazine :is(button,select,input){
 min-height:37px;border-radius:11px!important;
}
/* Original heatmap-powered drone and camera AR remain fully independent. */
body.ai2-native-embedded :is(#droneView,#propertyAR,#meterView){
 --ui-primary:#245f85;--ui-surface:#eef7fc;
}
body.ai2-native-embedded :is(#droneView,#propertyAR,#meterView) :is(.drone-top,.ar-top,.meter-top){
 border-radius:0!important;
}
body.ai2-native-embedded #meterView .meter-card{border-radius:15px!important}
body.ai2-native-embedded #meterView .meter-value{font-variant-numeric:tabular-nums!important}
/* Bookmarked calendar, charts and global atlas do not lose their navigation. */
body.ai2-native-embedded :is(.cal-workspace,.cal-hero,.cal-top,.cal-toolbar,#marketCharts){
 border-radius:16px!important;
}
body.ai2-native-embedded .event-card{border-radius:16px!important}
@media(max-width:700px){
 body.ai2-native-embedded :is(.prop-intro,.ai-page-heading,.ws-heading,.hd-heading){
   flex-wrap:wrap;align-items:flex-start;padding:13px!important;gap:8px!important;
 }
 body.ai2-native-embedded :is(.prop-filters,.directory-filters,.ai-tools,.hd-filters,.cal-filters){
   gap:7px!important;padding:9px!important;border-radius:14px!important;
 }
 body.ai2-native-embedded :is(.prop-card,.dir-card,.ws-card,.hd-card){width:100%!important;min-width:0!important}
 body.ai2-native-embedded .prop-results{grid-template-columns:1fr!important}
 body.ai2-native-embedded #dirRows .dir-card{display:flex;flex-direction:column;align-items:stretch;gap:6px}
 body.ai2-native-embedded #wsTabs button{min-height:38px;padding:7px 11px;font-size:12px!important}
 body.ai2-native-embedded :is(.prop-price,.hd-price){font-size:clamp(22px,6vw,29px)!important}
}

/* Apply before DOMContentLoaded: no legacy header flash while the accepted
   new design shell mounts around the original service engine. */
html.ai2-embed body,
html.ai2-embed body.ai-site-shell{
 padding-top:0!important;
 background:#f4f9fc!important;
}
html.ai2-embed #aiSiteHeader,
html.ai2-embed #ai2Header,
html.ai2-embed #ai2Dock{
 display:none!important;
}
html.ai2-embed body.ai-desktop-home{padding-top:46px!important}
html.ai2-embed body.ai-desktop-home #globalPriceTicker{top:0!important;inset:0 0 auto!important}

/* Source-specific Column Chart action for Off-plan, Resale and Transactions. */
body.ai2-native-embedded .market-view-tabs [data-market-column-chart]{display:inline-flex;align-items:center;justify-content:center;min-height:35px;padding:7px 12px;border:1px solid #aac9dc;border-radius:10px;background:#e9f3fa;color:#245f85;font:600 12px Dubai,Arial,sans-serif;white-space:nowrap;cursor:pointer;box-shadow:none}
body.ai2-native-embedded .market-view-tabs [data-market-column-chart]:hover{background:#d9ebf6}
body.ai2-native-embedded .market-view-tabs [data-market-column-chart][hidden]{display:none!important}
