/* WerkDok C3.3.2: responsive shell for tablets and phones.
   No changes to auth, posts, Firestore, workshop data or routes.
   Scope: the shared Community header and navigation, guest workshops. */
.wd-mobile-nav-toggle,.wd-mobile-nav-backdrop,.wd-mobile-drawer-header,.wd-mobile-quick-nav,.wd-mobile-drawer-extras{display:none}
body.on-workshops .ws-preferences{display:none!important}/* The shared header already owns theme/language. */
@media (max-width:1280px){
  body.on-community-feed .feed-topbar{position:sticky;top:0;z-index:90}
  body.on-community-feed .feed-topbar-inner{box-sizing:border-box!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;width:calc(100% - 24px)!important;max-width:none!important;min-width:0!important;min-height:0!important;height:60px!important;padding:6px 0!important}
  body.on-community-feed .feed-brand{box-sizing:border-box;min-width:0;flex:0 1 auto;order:0!important;align-self:center;white-space:nowrap}
  body.on-community-feed .feed-brand img{width:36px!important;height:36px!important;flex:none}
  body.on-community-feed .feed-brand .brand-word{font-size:clamp(14px,1.9vw,19px)!important;white-space:nowrap}
  body.on-community-feed .feed-main-nav{display:none!important}
  body.on-community-feed .feed-top-actions{box-sizing:border-box!important;display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;order:1!important;grid-column:auto!important;width:auto!important;max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important;min-width:0!important}
  body.on-community-feed .feed-utility-icons{order:0!important;gap:4px!important;display:flex;flex:0 0 auto}
  body.on-community-feed .feed-cta-group{display:none!important}
  body.on-community-feed .feed-overflow{display:none!important}
  body.on-community-feed .wdp-feed-language{flex:0 0 auto;min-width:52px;max-width:68px;height:38px;min-height:38px;padding:0 4px}
  body.on-community-feed .wdp-feed-language>.icon{display:none}
  body.on-community-feed .wdp-feed-language select{min-width:40px;max-width:57px;font-size:11px}
  body.on-community-feed .wdp-feed-theme-toggle{display:grid!important;place-items:center;flex:0 0 36px}
  body.on-community-feed .feed-avatar{order:3!important;width:36px!important;height:36px!important;min-width:36px!important}
  body.on-community-feed .feed-icon-btn{width:36px!important;min-width:36px!important;height:38px!important;min-height:38px!important;border-radius:11px}
  body.on-community-feed #wd-mobile-nav-toggle{order:2!important;display:grid!important;place-items:center;flex:0 0 36px}
  body.on-community-feed.ws-public-visitor #wd-mobile-nav-toggle{display:none!important}
  body.on-community-feed .feed-layout{display:flex!important;flex-direction:column!important;gap:12px!important;grid-template-columns:minmax(0,1fr)!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding:12px 0 26px!important}
  body.on-community-feed .feed-layout > *{min-width:0!important;max-width:100%!important}
  body.on-community-feed .feed-sidebar-left{box-sizing:border-box!important;display:block!important;position:fixed!important;z-index:122!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;width:min(340px,88vw)!important;max-width:340px!important;height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;padding:16px!important;transform:translateX(-110%)!important;visibility:hidden!important;pointer-events:none!important;transition:transform .22s ease,visibility .22s!important;order:0!important;background:var(--surface, #071c2a)!important;border:1px solid var(--border,rgba(60,168,188,.34))!important;border-radius:0 20px 20px 0!important;box-shadow:18px 0 60px rgba(0,0,0,.35)!important;scrollbar-width:thin}
  body.on-community-feed.wd-mobile-nav-open .feed-sidebar-left{transform:translateX(0)!important;visibility:visible!important;pointer-events:auto!important}
  body.on-community-feed.ws-public-visitor .feed-sidebar-left{display:none!important}
  body.on-community-feed .wd-mobile-nav-backdrop{display:none;position:fixed;inset:0;z-index:121;background:rgba(0,10,19,.64);border:0;width:100%;height:100%;cursor:pointer}
  body.on-community-feed.wd-mobile-nav-open .wd-mobile-nav-backdrop{display:block}
  body.wd-mobile-nav-open{overflow:hidden!important}
  body.on-community-feed .wd-mobile-drawer-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid var(--border,rgba(81,190,205,.2));color:var(--text)}
  body.on-community-feed .wd-mobile-drawer-header strong{font-size:16px;letter-spacing:.035em}
  body.on-community-feed .wd-mobile-drawer-header strong span{color:#27ccd3}
  body.on-community-feed .wd-mobile-nav-close{width:42px;height:42px;flex:none;background:var(--surface-2,#123044);border:1px solid var(--border,rgba(71,178,194,.3));border-radius:12px;color:var(--text);font-size:27px;cursor:pointer}
  body.on-community-feed .wd-mobile-quick-nav{display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0 14px}
  body.on-community-feed:is(.on-profile,.on-member) .wd-mobile-quick-nav{display:grid}
  body.on-community-feed .wd-mobile-quick-nav a,body.on-community-feed .wd-mobile-drawer-extras a{display:flex;min-height:42px;padding:10px 11px;align-items:center;justify-content:center;text-align:center;border-radius:12px;border:1px solid var(--border,rgba(83,163,177,.24));text-decoration:none;color:var(--text);font-size:13px;font-weight:700}
  body.on-community-feed .wd-mobile-drawer-extras{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:15px 0 5px}
  body.on-community-feed .feed-side-nav{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important;padding:8px!important}
  body.on-community-feed .feed-side-nav a{min-height:40px;white-space:normal}
  body.on-profile .feed-side-nav,body.on-member .feed-side-nav{display:none!important}
  body.on-community-feed .feed-side-promo{display:none!important}
  body.on-community-feed #wdp-profile-side-nav{width:100%!important;max-width:100%!important;max-height:none!important;min-height:0!important;padding:10px!important;flex-direction:column!important;align-items:stretch!important;gap:3px!important}
  body.on-community-feed #wdp-profile-side-nav .wdp-side-item,body.on-community-feed #wdp-profile-side-nav .wdp-side-collapse{width:100%!important;min-width:0!important;min-height:40px!important;padding:9px 12px!important;justify-content:flex-start!important}
  body.on-community-feed .feed-center,body.on-community-feed #wd-profile-panel,body.on-community-feed #wd-public-profile{order:1!important;width:100%!important;max-height:none!important;min-height:0!important;overflow:visible!important}
  body.on-community-feed .feed-sidebar-right{order:2!important;position:static!important;max-height:none!important;overflow:visible!important;width:100%!important}
  body.on-community-feed #wd-workshops-view{order:1!important}
}
/* Guest workshop pages: compact 1-2 rows, no duplicate locale/theme controls. */
@media (max-width:1280px){
 body.on-workshops.ws-public-visitor .feed-topbar-inner{justify-content:space-between!important;flex-wrap:nowrap!important}
 body.on-workshops.ws-public-visitor .feed-top-actions{width:auto!important;margin-left:auto!important;justify-content:flex-end!important;flex-wrap:nowrap!important}
 body.on-workshops.ws-public-visitor .ws-guest-auth-actions{display:flex!important;flex:0 0 auto;gap:7px}
 body.on-workshops.ws-public-visitor .ws-guest-auth-actions a{white-space:normal;text-align:center;min-height:38px;padding:8px 10px;font-size:12px}
 body.on-workshops.ws-public-visitor .ws-owner-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 15px}
 body.on-workshops.ws-public-visitor .ws-owner-actions>.ws-outline{min-height:43px;margin:0!important;max-width:none!important;white-space:normal!important;text-align:center;overflow-wrap:anywhere}
}
@media(max-width:660px){
 body.on-workshops.ws-public-visitor .feed-topbar-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;grid-template-rows:38px 42px!important;gap:5px 7px!important;height:auto!important;min-height:0!important;padding:7px 0 10px!important;align-items:center}
 body.on-workshops.ws-public-visitor .feed-brand{grid-column:1;grid-row:1;min-width:0}
 body.on-workshops.ws-public-visitor .feed-brand .brand-word{font-size:clamp(13px,3vw,17px)!important}
 body.on-workshops.ws-public-visitor .feed-top-actions{display:contents!important}
 body.on-workshops.ws-public-visitor #wdp-feed-theme-toggle{grid-column:2;grid-row:1}
 body.on-workshops.ws-public-visitor .wdp-feed-language{grid-column:3;grid-row:1}
 body.on-workshops.ws-public-visitor .ws-guest-auth-actions{grid-column:1/-1;grid-row:2;display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%}
 body.on-workshops.ws-public-visitor .ws-guest-auth-actions a{min-width:0;min-height:42px;font-size:12px;padding:8px 10px}
}
/* Logged-in narrow phones: one truly compact bar; all destinations remain in the slide menu. */
@media(max-width:520px){
 body.on-community-feed:not(.ws-public-visitor) .feed-brand .brand-word{display:none!important}
 body.on-community-feed .feed-topbar-inner{height:56px!important;width:calc(100% - 16px)!important}
 body.on-community-feed .feed-top-actions{gap:3px!important}
 body.on-community-feed .feed-utility-icons{gap:2px!important}
 body.on-community-feed .feed-icon-btn{width:34px!important;min-width:34px!important;height:36px!important;min-height:36px!important}
 body.on-community-feed .feed-avatar{width:34px!important;height:34px!important;min-width:34px!important}
 body.on-community-feed .wdp-feed-language{max-width:56px;min-width:48px;min-height:36px;height:36px;padding:0 2px}
 body.on-community-feed .wdp-feed-language select{min-width:38px;max-width:52px;font-size:11px}
 body.on-community-feed .feed-brand img{width:34px!important;height:34px!important}
 body.on-workshops.ws-public-visitor .feed-topbar-inner{height:auto!important;min-height:0!important;width:calc(100% - 20px)!important}
 body.on-workshops.ws-public-visitor .feed-brand .brand-word{display:inline!important}
}
@media(max-width:360px){
 body.on-community-feed:not(.ws-public-visitor) #wdp-feed-theme-toggle{display:none!important}/* theme remains in settings */
}
@media(prefers-reduced-motion:reduce){body.on-community-feed .feed-sidebar-left{transition:none!important}}
