/* V798c — Public phone header restoration.
   Portrait and coarse-pointer landscape use the approved three-part layout:
   long Fit button, fixed round help button, and Expo Planit logo. This final
   layer deliberately avoids a release body-class dependency so a missing or
   delayed responsive helper cannot stretch the help control again. */

@media (max-width:720px) and (orientation:portrait),
       (max-width:980px) and (orientation:landscape) and (pointer:coarse){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .cardHead{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 36px 96px!important;
    grid-template-rows:auto!important;
    align-items:center!important;
    gap:8px!important;
    padding:5px 9px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanTitleBlock,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #topKeyBtn,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #topWebsiteLinksBtn,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #topVisitorListBtn,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #topExhibitorsBtn,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions .publicDirectoryHeaderShortcut{
    display:none!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions{
    grid-column:1!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    gap:0!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #fitBtn{
    order:0!important;
    display:inline-flex!important;
    flex:1 1 auto!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
    margin:0!important;
    padding:3px 16px!important;
    border-radius:999px!important;
    font-size:11px!important;
    line-height:1!important;
    font-weight:950!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitMobileHelpBtnV795ge{
    grid-column:2!important;
    grid-row:1!important;
    display:inline-flex!important;
    flex:0 0 36px!important;
    align-items:center!important;
    justify-content:center!important;
    justify-self:center!important;
    align-self:center!important;
    box-sizing:border-box!important;
    inline-size:36px!important;
    min-inline-size:36px!important;
    max-inline-size:36px!important;
    block-size:36px!important;
    min-block-size:36px!important;
    max-block-size:36px!important;
    aspect-ratio:1 / 1!important;
    margin:0!important;
    padding:0!important;
    border-radius:50%!important;
    white-space:nowrap!important;
    font:900 17px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    text-align:center!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    grid-column:3!important;
    grid-row:1!important;
    display:flex!important;
    flex:0 0 96px!important;
    align-items:center!important;
    justify-content:flex-end!important;
    box-sizing:border-box!important;
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    overflow:visible!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand::before{
    display:none!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    display:block!important;
    width:92px!important;
    max-width:92px!important;
    height:auto!important;
    max-height:36px!important;
    opacity:.94!important;
    overflow:visible!important;
  }
}

@media (max-width:720px) and (orientation:portrait){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .cardHead{
    grid-template-columns:minmax(0,1fr) 32px 86px!important;
    gap:6px!important;
    padding:5px 8px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #fitBtn{
    height:29px!important;
    min-height:29px!important;
    max-height:29px!important;
    font-size:10.8px!important;
    padding:3px 14px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitMobileHelpBtnV795ge{
    flex-basis:32px!important;
    inline-size:32px!important;
    min-inline-size:32px!important;
    max-inline-size:32px!important;
    block-size:32px!important;
    min-block-size:32px!important;
    max-block-size:32px!important;
    font-size:16px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    flex-basis:86px!important;
    width:86px!important;
    min-width:86px!important;
    max-width:86px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    width:84px!important;
    max-width:84px!important;
  }
}

@media (max-width:370px) and (orientation:portrait){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .cardHead{
    grid-template-columns:minmax(0,1fr) 30px 72px!important;
    gap:4px!important;
    padding-left:6px!important;
    padding-right:6px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitMobileHelpBtnV795ge{
    flex-basis:30px!important;
    inline-size:30px!important;
    min-inline-size:30px!important;
    max-inline-size:30px!important;
    block-size:30px!important;
    min-block-size:30px!important;
    max-block-size:30px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    flex-basis:72px!important;
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
  }

  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    width:70px!important;
    max-width:70px!important;
  }
}


/* V798c — when a detailed SVG is active, Public exposes an obvious escape
   back to the authored Overview Map beside Fit. */
.publicFitOverviewGroup{
  display:inline-flex;
  align-items:stretch;
  min-width:0;
  gap:0;
}
.publicFitOverviewGroup .publicEventOverviewBtn[hidden]{display:none!important;}
.publicFitOverviewGroup.hasEventOverview .publicEventOverviewBtn,
.publicFitOverviewGroup.hasEventOverview #fitBtn{
  border-radius:0!important;
}
.publicFitOverviewGroup.hasEventOverview .publicEventOverviewBtn{
  border-radius:999px 0 0 999px!important;
  border-right-width:0!important;
}
.publicFitOverviewGroup.hasEventOverview #fitBtn{
  border-radius:0 999px 999px 0!important;
}
@media (max-width:720px) and (orientation:portrait),
       (max-width:980px) and (orientation:landscape) and (pointer:coarse){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions .publicFitOverviewGroup{
    display:flex!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions .publicFitOverviewGroup #eventOverviewBtn,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions .publicFitOverviewGroup #fitBtn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    height:29px!important;
    min-height:29px!important;
    max-height:29px!important;
    margin:0!important;
    padding:3px 8px!important;
    font-size:10.2px!important;
    line-height:1!important;
    font-weight:950!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions .publicFitOverviewGroup #eventOverviewBtn{
    flex:1 1 72%!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions .publicFitOverviewGroup #fitBtn{
    flex:0 1 28%!important;
    width:auto!important;
    max-width:none!important;
  }
  /* Preserve the complete lower edge of the masked Expo Planit word-mark. */
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    padding:1px 0 5px!important;
    overflow:visible!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    width:82px!important;
    max-width:82px!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    transform:translateY(-1px)!important;
    overflow:visible!important;
  }
}


/* V798c — Public phone top card is now a slim help/logo strip. Fit and Overview
   live with the permanent lower plan-navigation controls. */
@media (max-width:720px) and (orientation:portrait),
       (max-width:980px) and (orientation:landscape) and (pointer:coarse){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .cardHead{
    display:grid!important;
    grid-template-columns:36px minmax(0,1fr)!important;
    grid-template-rows:52px!important;
    min-height:52px!important;
    max-height:52px!important;
    height:52px!important;
    gap:12px!important;
    padding:2px 9px!important;
    overflow:visible!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions .publicFitOverviewGroup,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #fitBtn,
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .publicPlanActions #eventOverviewBtn{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitMobileHelpBtnV795ge{
    grid-column:1!important;
    grid-row:1!important;
    justify-self:start!important;
    align-self:center!important;
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    grid-column:2!important;
    grid-row:1!important;
    justify-self:end!important;
    align-self:center!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    width:118px!important;
    min-width:118px!important;
    max-width:118px!important;
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    margin:0!important;
    padding:0 0 5px!important;
    overflow:visible!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    display:block!important;
    width:112px!important;
    max-width:112px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    object-fit:contain!important;
    object-position:center!important;
    transform:translateY(-1px)!important;
    overflow:visible!important;
  }
}

@media (max-width:370px) and (orientation:portrait){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .cardHead{
    grid-template-columns:32px minmax(0,1fr)!important;
    gap:8px!important;
    padding-left:7px!important;
    padding-right:7px!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    width:104px!important;
    min-width:104px!important;
    max-width:104px!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    width:100px!important;
    max-width:100px!important;
  }
}

/* V798c — final public-phone word-mark lower-edge allowance.
   This file loads after the shared responsive corrections, so the final rule
   deliberately keeps the speech-tail above the header divider. */
@media (max-width:720px) and (orientation:portrait),
       (max-width:980px) and (orientation:landscape) and (pointer:coarse){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .cardHead{
    overflow:visible!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    height:50px!important;
    min-height:50px!important;
    max-height:50px!important;
    padding:0 0 8px!important;
    overflow:visible!important;
    transform:translateY(-1px)!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    width:114px!important;
    max-width:114px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    -webkit-mask-position:center 45%!important;
    mask-position:center 45%!important;
    -webkit-mask-size:contain!important;
    mask-size:contain!important;
    transform:translateY(-3px)!important;
    overflow:visible!important;
  }
}
@media (max-width:370px) and (orientation:portrait){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    width:102px!important;
    max-width:102px!important;
  }
}


/* V798c — final speech-tail clearance after device testing. */
@media (max-width:720px) and (orientation:portrait),
       (max-width:980px) and (orientation:landscape) and (pointer:coarse){
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand{
    padding-bottom:10px!important;
    transform:translateY(-2px)!important;
  }
  body.publicHeaderControlsMode:not(.touchscreenMode) #planCard .expoPlanitPublicHeaderBrand .expoPlanitLogoMark{
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    -webkit-mask-position:center 41%!important;
    mask-position:center 41%!important;
    transform:translateY(-6px)!important;
  }
}
