/* POSguard shared interaction tokens: consistent rhythm on desktop and mobile. */
:root{
  --ui-component-height:52px;
  --ui-mobile-component-height:48px;
  --ui-border-radius:10px;
  --ui-control-padding-inline:14px;
  --ui-control-font-size:16px;
  --ui-action-font-size:15px;
}

/* All public controls share one geometry; text areas retain room for content. */
body.pg-page-home{--ui-control-font-size:15px}

body.pg-visual-system :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  select,button,.cta,.ghost,.pgd-btn,.pgd-cms-quote,.pg-home-quote,
  .pg-quote-add,.pg-filter-open,.pg-photo-fallback,.pg-sticky-contact
){
  box-sizing:border-box!important;
  height:var(--ui-component-height)!important;
  min-height:var(--ui-component-height)!important;
  max-height:var(--ui-component-height)!important;
  border-radius:var(--ui-border-radius)!important;
  line-height:1.2!important;
  padding-block:0!important;
}

body.pg-visual-system :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  select
){
  padding-inline:var(--ui-control-padding-inline)!important;
  font-size:var(--ui-control-font-size)!important;
}

body.pg-visual-system :is(
  .cta,.ghost,.pgd-btn,.pgd-cms-quote,.pg-home-quote,
  .pg-quote-add,.pg-filter-open,.pg-photo-fallback,.pg-sticky-contact
){
  padding-inline:var(--ui-control-padding-inline)!important;
  font-size:var(--ui-action-font-size)!important;
}

body.pg-visual-system textarea{
  box-sizing:border-box!important;
  min-height:120px;
  padding:12px var(--ui-control-padding-inline)!important;
  border-radius:var(--ui-border-radius)!important;
  line-height:1.5;
}

/* Search shells use the same radius as their input and action. */
body.pg-visual-system :is(.pgd-hero-search,.pg-header-search){border-radius:var(--ui-border-radius)!important}

/* Keep the two home search controls pixel-matched on both breakpoints. */
body.pg-visual-system.pg-page-home .pgd-hero-search input,
body.pg-visual-system.pg-page-home .pgd-hero-search button{
  height:var(--ui-component-height)!important;
  min-height:var(--ui-component-height)!important;
  max-height:var(--ui-component-height)!important;
  border-radius:var(--ui-border-radius)!important;
  font-size:15px!important;
  line-height:1.2!important;
}

@media(max-width:900px){
  :root{--ui-component-height:var(--ui-mobile-component-height)}
  body.pg-visual-system.pg-page-home .pgd-hero-search input,
  body.pg-visual-system.pg-page-home .pgd-hero-search button{
    height:var(--ui-mobile-component-height)!important;
    min-height:var(--ui-mobile-component-height)!important;
    max-height:var(--ui-mobile-component-height)!important;
    border-radius:var(--ui-border-radius)!important;
    font-size:15px!important;
  }
  body.pg-visual-system.pg-page-home .pg-home-mobile-tools .mobile-menu{
    height:var(--ui-mobile-component-height)!important;
    min-height:var(--ui-mobile-component-height)!important;
    max-height:var(--ui-mobile-component-height)!important;
    border-radius:var(--ui-border-radius)!important;
  }
}

/* Accessible interaction polish shared by public pages and both breakpoints. */
body.pg-visual-system :is(a,button,input,select,textarea,[role="button"]){
  transition-duration:.3s!important;
  transition-timing-function:ease!important;
}
body.pg-visual-system :is(a,button,input,select,textarea,[role="button"]):focus-visible{
  outline:3px solid #6bd4ff!important;
  outline-offset:3px!important;
  box-shadow:none!important;
}
body.pg-visual-system[data-pg-cms-theme="light"] :is(a,button,input,select,textarea,[role="button"]):focus-visible{
  outline-color:#075a9c!important;
}
body.pg-visual-system:not([data-pg-cms-theme="light"]) :is(input,textarea)::placeholder{
  color:#c2d0de;
  opacity:1;
}

/* Keep menu overlays off-canvas until opened, then animate them without layout shift. */
@media(max-width:900px){
  .pg-page-home .pg-home-mobile-panel,
  .subpage-shell .mobile-panel{
    display:flex!important;
    position:fixed!important;
    inset:0!important;
    z-index:115!important;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(14px);
    background:#020811;
    transition:opacity .3s ease,transform .3s ease,visibility 0s linear .3s;
  }
  .pg-page-home .pg-home-mobile-panel.open,
  .subpage-shell .mobile-panel.open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0);
    transition:opacity .3s ease,transform .3s ease,visibility 0s linear;
  }
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  body.pg-visual-system :is(a,button,input,select,textarea,[role="button"]){transition:none!important}
  .pg-page-home .pg-home-mobile-panel,
  .subpage-shell .mobile-panel,
  .pg-page-home .pg-home-mobile-panel.open,
  .subpage-shell .mobile-panel.open{transition:none!important;transform:none!important}
}
