/* v4.8 — uses existing tenant-compatible colour tokens. */
.rb48-complex-header{display:flex!important;align-items:flex-start!important;gap:18px!important;padding:20px!important;background:var(--rb-surface);color:var(--rb-text)}
.rb48-cover{width:148px;height:112px;object-fit:cover;border-radius:12px;flex-shrink:0}
.rb48-project-info{flex:1;min-width:0}
.rb48-project-info h2{margin:0 0 6px;font-size:21px;line-height:1.3}
.rb48-project-info p{margin:5px 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.rb48-project-meta{color:var(--rb-muted)}
.rb48-project-info .count{display:inline-block;margin-top:8px;padding:5px 9px;border:1px solid var(--rb-line);border-radius:8px;font-size:12px}
.rb48-flat-context{margin:0 0 16px;font-size:13px;line-height:1.5;color:var(--rb-muted)}
.rb48-data-note{font-size:12px;line-height:1.5;padding:12px;border:1px solid var(--rb-line);border-radius:10px;color:var(--rb-muted)}
body.rb-page-auto_selection #planModal.rb-apartment-modal>.modal-content{width:min(1120px,100%);max-width:1120px}
body.rb-page-auto_selection .rb-expanded-flat.flat-card{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:start}
body.rb-page-auto_selection .rb-expanded-flat>.rb-detail-plan{padding:24px;min-width:0;position:sticky;top:0;background:#fff}
body.rb-page-auto_selection .rb-expanded-flat>.rb-detail-plan img{width:100%;height:auto;max-height:520px;object-fit:contain}
body.rb-page-auto_selection .rb-expanded-flat>.rb-detail-plan.is-expanded{grid-column:1/-1;position:static}
body.rb-page-auto_selection .rb-expanded-flat>.rb-detail-plan.is-expanded img{max-height:none}
body.rb-page-auto_selection .rb-expanded-flat>.body{min-width:0;padding:24px!important}
body.rb-page-auto_selection .rb-expanded-flat>.share-block{grid-column:1/-1}
body.rb-page-auto_selection .rb-expanded-flat .mortgage-info{width:100%;box-sizing:border-box}
body.rb-page-auto_selection .rb-expanded-flat :is(.details,.price-row,.mortgage-info){overflow-wrap:anywhere;min-width:0}
body.rb-page-auto_selection .rb-flat-summary .rb-summary-content{padding:16px;gap:7px}
body.rb-page-auto_selection .rb-flat-summary .rb-summary-heading{flex-wrap:wrap;gap:8px}
body.rb-page-auto_selection .rb-flat-summary .rb-summary-heading strong{min-width:0;overflow-wrap:anywhere}
#filtersGrid select{max-width:100%;min-height:44px}
@media(max-width:760px){
 .rb48-complex-header{gap:12px!important;padding:16px!important}
 .rb48-cover{width:76px;height:76px}
 .rb48-project-info h2{font-size:18px}
 .rb48-project-info p{font-size:12px}
 body.rb-page-auto_selection .rb-expanded-flat.flat-card{grid-template-columns:minmax(0,1fr)}
 body.rb-page-auto_selection .rb-expanded-flat>.rb-detail-plan{position:static;padding:16px}
 body.rb-page-auto_selection .rb-expanded-flat>.rb-detail-plan img{max-height:340px}
 body.rb-page-auto_selection .rb-expanded-flat>.body{padding:16px!important}
 body.rb-page-auto_selection .rb-flat-summary .rb-summary-content{padding:14px}
}
@media(max-width:380px){body.rb-page-auto_selection .rb-flat-summary{grid-template-columns:80px minmax(0,1fr)!important}}
/* v4.8.1: one cover, no inline image strip. */
.rb481-cover-button{padding:0;border:0;border-radius:12px;background:transparent;cursor:zoom-in;flex-shrink:0;overflow:hidden;line-height:0}
.rb481-cover-button .rb48-cover{display:block!important}
.rb481-more{display:block;min-height:44px;margin:4px 0 0;padding:5px 0;background:transparent;border:0;color:var(--rb-blue);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.rb481-gallery-dialog{box-sizing:border-box;width:min(1200px,calc(100vw - 32px));height:min(900px,calc(100dvh - 32px));max-width:100vw;max-height:100dvh;padding:0;border:1px solid var(--rb-line,#42505c);border-radius:18px;background:var(--rb-surface,#fff);color:var(--rb-text,#172c38);overflow:hidden}
.rb481-gallery-dialog[open]{display:flex;flex-direction:column}
.rb481-gallery-dialog::backdrop{background:rgba(5,14,24,.8)}
.rb481-gallery-bar{display:flex;align-items:center;gap:12px;padding:10px 14px;flex-shrink:0;border-bottom:1px solid var(--rb-line,#ddd)}
.rb481-title{flex:1;min-width:0;margin:0;font-size:18px;overflow-wrap:anywhere}
.rb481-counter{white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums}
.rb481-gallery-dialog button{min-width:44px;min-height:44px;border:1px solid var(--rb-line,#ddd);border-radius:10px;background:var(--rb-surface,#fff);color:var(--rb-text,#172c38);font-size:25px;cursor:pointer}
.rb481-gallery-dialog button:disabled{opacity:.35;cursor:default}
.rb481-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:10px;overflow:hidden;touch-action:pan-y pinch-zoom}
.rb481-stage .rb481-full-image{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.rb481-gallery-nav{display:flex;justify-content:center;gap:18px;padding:8px 12px max(12px,env(safe-area-inset-bottom));flex-shrink:0}
.rb481-cover-button:focus-visible,.rb481-more:focus-visible,.rb481-gallery-dialog button:focus-visible{outline:3px solid var(--rb-blue,#1674b9);outline-offset:3px}
@media(max-width:600px){
 .rb481-gallery-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);border-radius:12px}
 .rb481-gallery-bar{padding:8px;gap:8px}.rb481-title{font-size:16px}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-content{padding:10px 12px;gap:3px}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-heading{gap:4px 7px;line-height:1.2}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-heading strong{font-size:14px}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-discount{padding:2px 5px;font-size:11px;line-height:1.2}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-muted{font-size:11px;line-height:1.25}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-price{margin-top:3px;font-size:18px;line-height:1.2}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-payment{margin-top:3px;padding-top:5px;font-size:18px;line-height:1.2}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-cta{display:none}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-plan{height:125px;margin:8px 0 8px 8px;align-self:center}
 body.rb-service.rb-page-auto_selection .rb-flat-summary .rb-summary-plan img{padding:6px}
}

/* v4.8.2: explicit dialog centering overrides global margin resets.
   Intrinsic image size keeps portrait/landscape frames free of white bands. */
html body dialog.rb481-gallery-dialog{
 position:fixed!important;inset:0!important;margin:auto!important;
 width:fit-content!important;height:fit-content!important;
 min-width:min(300px,calc(100vw - 24px));
 max-width:min(1200px,calc(100vw - 24px))!important;
 max-height:calc(100dvh - 24px)!important;
 padding:0!important;border:0!important;box-sizing:border-box;
 background:#111b25;color:#fff;box-shadow:0 18px 70px #0006;
}
html body dialog.rb481-gallery-dialog .rb481-gallery-bar{padding:8px 12px;border-color:#ffffff26}
html body dialog.rb481-gallery-dialog .rb481-stage{flex:0 1 auto;min-height:0;padding:0;background:#111b25}
html body dialog.rb481-gallery-dialog .rb481-full-image{
 display:block;width:auto!important;height:auto!important;object-fit:contain;
 max-width:min(1200px,calc(100vw - 24px))!important;
 max-height:calc(100dvh - 160px - env(safe-area-inset-bottom))!important;
 margin:0 auto;padding:0;
}
html body dialog.rb481-gallery-dialog button{background:#20303e;color:white;border-color:#ffffff35}
html body dialog.rb481-gallery-dialog .rb481-gallery-nav{padding-top:6px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
.rb482-project-media{display:flex;flex-direction:column;align-items:stretch;flex:0 0 148px;min-width:0}
.rb482-project-media .rb481-more{margin:2px 0 0;text-align:center;font-size:12px;line-height:1.25;white-space:normal}
@media(max-width:760px){
 .rb482-project-media{flex-basis:88px}
 .rb482-project-media .rb48-cover{width:88px;height:76px}
 .rb482-project-media .rb481-more{font-size:11px;padding:3px 0}
}
