/* Collaborative Work responsive layer - mobile/tablet/desktop */
:root{
  --cw-safe-bottom: env(safe-area-inset-bottom, 0px);
  --cw-fluid-x: clamp(14px, 3vw, 36px);
  --cw-radius-lg: clamp(18px, 2vw, 30px);
  --cw-shadow-soft: 0 18px 55px rgba(15, 35, 65, .10);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{overflow-x:hidden;min-width:320px}
img,svg,video,canvas{max-width:100%;height:auto}
button,a,input,select,textarea{touch-action:manipulation}
button,.btn,a[role="button"],.nav-link{min-height:42px}
.container,.container-fluid{padding-left:var(--cw-fluid-x);padding-right:var(--cw-fluid-x)}

/* Header and global search */
.navbar{min-height:72px}.navbar .container{max-width:1680px}.navbar-brand img{max-width:min(210px,42vw);height:auto!important;max-height:64px;object-fit:contain}.navbar-toggler{border:1px solid #dbe5f2;border-radius:14px;padding:.55rem .7rem}.navbar-toggler:focus{box-shadow:0 0 0 .2rem rgba(28,126,214,.18)}
.nav-search{min-width:0!important}.search-pill{max-width:980px}.search-pill .value,.search-pill input{min-width:0}.search-pill .btn-search,.btn-search{flex:0 0 auto}

/* Cards and common grids */
.card,.property-card,.booking-card,.dash-card,.profile-card,.summary-card,.panel,.section-card,.cw-card{border-radius:var(--cw-radius-lg)!important;box-shadow:var(--cw-shadow-soft);border-color:#e2ecf8!important}
.row{--bs-gutter-x:clamp(1rem,2vw,1.75rem)}
.table-responsive{border-radius:18px;border:1px solid #e6eef8;background:#fff}.table{min-width:680px}.table th{white-space:nowrap}.table td{vertical-align:middle}
.form-control,.form-select,.btn{border-radius:14px}.btn{font-weight:750}.input-group>.form-control,.input-group>.form-select,.input-group>.btn{min-height:44px}
.modal-dialog{margin:var(--cw-fluid-x) auto}.modal-content{border-radius:24px;border:0;box-shadow:0 26px 90px rgba(8,26,55,.22)}

/* Footer: only icons requested */
.cw-pref-icon-btn span[data-cw-locale-label],.cw-pref-icon-btn span[data-cw-currency-label],.cw-pref-icon-btn span[data-cw-currency-symbol],#ft-locale-label,#ft-currency-symbol,#ft-currency-code{display:none!important}.cw-pref-icon-btn{width:48px;height:48px;border-radius:999px!important;display:inline-grid!important;place-items:center;padding:0!important;background:#fff}.cw-pref-icon-btn i{font-size:1.12rem}.footer-social a{width:38px;height:38px;border-radius:999px;background:#f7fbff;margin-left:6px!important;text-decoration:none}
footer .container>div{gap:12px!important}

/* Dashboard/sidebar layouts */
.dashboard-shell,.dash-shell,.account-shell,.profile-shell{display:grid;grid-template-columns:minmax(250px,320px) minmax(0,1fr);gap:clamp(16px,2vw,28px);align-items:start}.dashboard-sidebar,.sidebar,.dash-sidebar{position:sticky;top:calc(var(--hdr-h,72px) + 18px);max-height:calc(100vh - var(--hdr-h,72px) - 32px);overflow:auto}.dashboard-main,.dash-main,.profile-main{min-width:0}.dashboard-main .row>[class*="col"],.dash-main .row>[class*="col"]{min-width:0}

/* Explore/property grids */
.results-grid,.property-grid,.listing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:clamp(14px,2vw,24px)}.property-card img,.listing-card img,.explore-card img{aspect-ratio:4/3;object-fit:cover}.map-pane,.map-panel,#map{min-height:360px;border-radius:24px;overflow:hidden}.explore-layout,.search-results-layout{display:grid;grid-template-columns:minmax(320px,560px) minmax(360px,1fr);gap:clamp(16px,2vw,28px)}

/* Property detail / checkout */
.property-detail-grid,.checkout-grid,.booking-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr);gap:clamp(18px,2.5vw,36px);align-items:start}.sticky-booking,.booking-sidebar,.checkout-summary,.price-card{position:sticky;top:calc(var(--hdr-h,72px) + 24px)}.gallery-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px}.gallery-grid img{width:100%;height:100%;object-fit:cover;min-height:140px}.calendar-wrap,.calendar-card{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Chat */
.chat-row,.chat-layout{min-height:calc(100vh - var(--hdr-h,72px) - 90px)}.chat-list,.chat-thread,.chat-panel{min-width:0}.message-bubble{max-width:min(78%,680px);overflow-wrap:anywhere}.chat-composer{position:sticky;bottom:0;background:#fff;padding-bottom:calc(10px + var(--cw-safe-bottom));z-index:5}

/* Locale/currency modals */
.cw-locale-modal .modal-dialog,.cw-currency-modal .modal-dialog{max-width:min(980px,calc(100vw - 28px))}.cw-locale-modal .modal-body,.cw-currency-modal .modal-body{max-height:min(72vh,760px);overflow:auto;-webkit-overflow-scrolling:touch}.cw-locale-option,.cw-currency-option{min-height:74px}

@media (min-width:1400px){.container{max-width:1600px}.container-fluid{max-width:1800px}.home-hero-shell>.container{max-width:1760px}}
@media (max-width:1199.98px){
  .explore-layout,.search-results-layout{grid-template-columns:1fr}.map-pane,.map-panel,#map{height:420px;min-height:420px}.property-detail-grid,.checkout-grid,.booking-layout{grid-template-columns:1fr}.sticky-booking,.booking-sidebar,.checkout-summary,.price-card{position:static}.dashboard-shell,.dash-shell,.account-shell,.profile-shell{grid-template-columns:1fr}.dashboard-sidebar,.sidebar,.dash-sidebar{position:relative;top:auto;max-height:none;overflow:visible}.admin-layout,.admin-shell{grid-template-columns:1fr!important}
}
@media (max-width:991.98px){
  :root{--hdr-h:86px} body{padding-top:var(--hdr-h)!important}.navbar{min-height:var(--hdr-h)}.navbar .container{gap:8px}.navbar-collapse{background:#fff;border:1px solid #e6eef8;border-radius:20px;margin-top:10px;padding:8px;box-shadow:0 18px 45px rgba(15,35,65,.12)}.navbar-nav{gap:4px}.navbar-nav .nav-link{border-radius:14px;padding:.75rem .9rem!important}.nav-search{order:3;width:100%;padding:0!important}.search-pill{width:100%!important;grid-template-columns:1fr auto!important;border-radius:24px!important;padding:8px!important;gap:6px;overflow:visible!important}.search-pill .cell{border:1px solid #e6eef8!important;border-radius:16px!important;padding:10px 12px!important;background:#fff}.search-pill .cell+ .cell::before{display:none!important}.search-pill .cell:not(:first-child):not(:last-child){display:none!important}.search-pill #cellWho{display:flex!important;border:0!important;padding:0!important;background:transparent}.search-pill .btn-search{width:48px!important;height:48px!important;margin:0!important}.dest-panel,.date-panel,.guests-panel{position:fixed!important;left:12px!important;right:12px!important;top:calc(var(--hdr-h,86px) + 10px)!important;width:auto!important;max-width:none!important;max-height:72vh!important;border-radius:22px!important}.flatpickr-calendar{max-width:100%!important}.dayContainer{max-width:100%!important;min-width:100%!important}.flatpickr-days{width:100%!important}.footer-social{flex-wrap:wrap;justify-content:center}footer{text-align:center}footer .container>div{align-items:center!important}
}
@media (max-width:767.98px){
  h1,.h1{font-size:clamp(2rem,10vw,3.2rem)!important;line-height:.98} h2,.h2{font-size:clamp(1.45rem,6vw,2.15rem)!important}.lead{font-size:1rem}.container,.container-fluid{padding-left:16px;padding-right:16px}.home-hero,.hero-grid,.home-hero-shell .row{grid-template-columns:1fr!important}.home-hero-art{min-height:360px!important;border-radius:24px!important}.home-hero-title{max-width:100%!important}.hero-search-card,.search-card{grid-template-columns:1fr!important;border-radius:24px!important;padding:12px!important}.hero-field{border-right:0!important;border:1px solid #dbeafe!important;border-radius:16px!important;margin-bottom:8px}.hero-submit,.search-submit{width:100%!important;height:52px!important}.hero-kind-toggle{width:100%!important}.results-grid,.property-grid,.listing-grid{grid-template-columns:1fr}.gallery-grid{grid-template-columns:1fr}.gallery-grid img{min-height:220px}.map-pane,.map-panel,#map{height:320px;min-height:320px;border-radius:20px}.property-detail-grid,.checkout-grid,.booking-layout{gap:16px}.card-body{padding:1rem}.table{font-size:.92rem}.modal-dialog{margin:10px}.modal-content{border-radius:22px}.cw-locale-grid,.cw-locale-grid.suggested,.cw-currency-grid{grid-template-columns:1fr!important}.cw-locale-modal .modal-body,.cw-currency-modal .modal-body{max-height:calc(100dvh - 130px)}.chat-row,.chat-layout{display:block!important}.chat-list{max-height:280px;overflow:auto;border-radius:18px}.message-bubble{max-width:88%}.dashboard-main .row,.dash-main .row{--bs-gutter-y:1rem}
}
@media (max-width:575.98px){
  body{font-size:15px}.navbar-brand img{max-width:170px}.search-pill .label{font-size:.73rem}.search-pill .value,.search-pill input{font-size:.95rem}.btn,.form-control,.form-select{min-height:46px}.btn-lg{min-height:52px;font-size:1rem}.footer-social a{width:42px;height:42px}.cw-pref-icon-btn{width:46px;height:46px}.toast,.alert{border-radius:16px}.property-card,.listing-card,.explore-card{border-radius:22px!important}.price,.amount,[class*="price"]{overflow-wrap:anywhere}.offcanvas{max-width:92vw}.mobile-full,.w-sm-100{width:100%!important}.d-sm-grid-1{display:grid!important;grid-template-columns:1fr!important}.hide-on-phone{display:none!important}.sticky-bottom-mobile{position:sticky;bottom:calc(10px + var(--cw-safe-bottom));z-index:20}.calendar-card .flatpickr-calendar.inline{transform-origin:top left}
}
@media (max-width:380px){.navbar-brand img{max-width:145px}.container,.container-fluid{padding-left:12px;padding-right:12px}.search-pill{padding:6px!important}.search-pill .cell{padding:8px!important}.search-pill .btn-search{width:44px!important;height:44px!important}.footer-social a{width:38px;height:38px}}
@media (hover:hover){.card,.property-card,.listing-card,.explore-card{transition:transform .18s ease,box-shadow .18s ease}.property-card:hover,.listing-card:hover,.explore-card:hover{transform:translateY(-2px);box-shadow:0 24px 70px rgba(15,35,65,.14)}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}


/* PATCH: index.php has its own sticky topbar, so it must not receive
   the fixed-navbar body padding used by inner pages. */
body.cw-index-page{padding-top:0!important;}
@media (max-width:991.98px){
  body.cw-index-page{padding-top:0!important;}
  body.cw-index-page .navbar{min-height:initial!important;}
}

/* PATCH: professional user avatars with safe initials fallback */
.private-row-main-with-avatar{display:flex;align-items:center;gap:12px;min-width:0}.private-mini-avatar{width:44px;height:44px;border-radius:16px;background:linear-gradient(135deg,#2563eb,#38bdf8);color:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;flex:0 0 auto;font-weight:950;letter-spacing:.02em;box-shadow:0 10px 24px rgba(37,99,235,.16)}.private-mini-avatar .dash-avatar-initials{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.private-mini-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}.cw-rel-avatar .dash-avatar-initials{z-index:0}.cw-rel-avatar img{z-index:1}
