/* Zibayab Hybrid 0.17.9 — mobile containment, viewport drawer and RTL table balance.
   This layer is deliberately last. Do not change Core/Profiles HTML contracts. */

/* The two dialogs are portaled to <body> by shell.js. Sticky header stacking and
   overflow clipping must not constrain a fixed off-canvas navigation panel. */
body.zih-phase-one-shell > .zih-panel-backdrop-portal{
  position:fixed!important;inset:0!important;z-index:10000!important;
  background:rgba(6,9,17,.28)!important;backdrop-filter:none!important;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal{
  position:fixed!important;top:0!important;bottom:auto!important;right:0!important;left:auto!important;
  z-index:10002!important;width:min(362px,calc(100vw - 32px))!important;
  max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;
  margin:0!important;padding:18px 18px max(20px,env(safe-area-inset-bottom))!important;
  border:0!important;border-radius:0 0 0 22px!important;
  background:#fff!important;color:#151515!important;
  box-shadow:-15px 0 55px rgba(8,8,18,.16)!important;
  direction:rtl;overflow-x:clip!important;overflow-y:auto!important;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
body.zih-phase-one-shell > .zih-search-panel.zih-panel-portal{
  position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;
  transform:translate(-50%,-50%)!important;z-index:10003!important;
  width:min(540px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)!important;
  max-height:calc(100dvh - 36px)!important;overflow:auto!important;
  margin:0!important;border-radius:20px!important;background:#fff!important;color:#141414!important;
  overscroll-behavior:contain;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-panel__heading{
  padding:1px 0 15px;min-height:43px;margin:0;border-bottom:1px solid #ededee;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-panel__heading strong{font-size:17px}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-panel__heading button{
  display:grid;place-items:center;width:36px;height:36px;min-width:36px;border-radius:50%;
  background:#f6f6f7;border:1px solid #eee;color:#171717;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-nav__links{
  display:grid;gap:3px;padding:12px 0;max-height:none;overflow:visible;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-nav__links>a{
  padding:11px 10px;min-height:44px;gap:9px;border-radius:11px;line-height:1.65;font-size:13px;
  color:#262626;overflow-wrap:anywhere;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-nav__links>a.is-active{
  background:#f3f1ff;color:#644ee1;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-menu-panel__bottom{
  display:grid;gap:2px;padding-top:12px;margin-top:6px;border-top:1px solid #ededee;
}
body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal .zih-menu-panel__bottom>a{
  min-height:40px;padding:9px 10px;font-size:12px;
}
html.zih-panel-open{overflow:hidden!important}
body.zih-modal-open{overflow:hidden!important}

/* Rating is a compact item in the badge row, never a separate line in meta. */
.zih-provider--market .zih-provider__overline{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
.zih-provider--market .zih-provider__overline .zih-provider__score{
  display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;
  margin:0!important;padding:2px 5px!important;
  border-radius:6px;background:#f6f3ff;color:#6c54ee;
  font-size:10px!important;line-height:1.45!important;font-weight:850!important;
  white-space:nowrap;text-decoration:none;
}
.zih-provider--market .zih-provider__overline .zih-provider__score--user{
  color:#91640c;background:#fff7e7;
}
.zih-provider--market .zih-provider__overline .zih-provider__score small{
  font-size:9px;color:inherit;font-weight:650;
}
.zih-provider--market .zih-provider__meta:empty{display:none!important}

@media (max-width:899px){
  body.admin-bar.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal{
    top:var(--wp-admin--admin-bar--height,46px)!important;
    height:calc(100dvh - var(--wp-admin--admin-bar--height,46px))!important;
    max-height:calc(100dvh - var(--wp-admin--admin-bar--height,46px))!important;
  }
  /* All public inner pages are clipped to the available viewport at the main
     boundary. Scrollable tables retain their own horizontal scroll region. */
  body.zih-phase-one-shell:not(.zih-parity-home) .zih-main{
    min-width:0;max-width:100%;overflow-x:clip;
  }
  /* Never allow inner directory sections, consultation embeds or long-tail columns
     to increase the document's horizontal layout width. The comparison table is
     allowed to scroll inside its own rounded container. */
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local){
    display:block;max-width:100%;min-width:0;overflow-x:clip;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) :is(
    .zih-container,.zih-cs-section,.zih-cs-summary,.zih-cs-providers,
    .zih-cs-card-item,.zih-cs-hero,.zih-cs-hero__content,
    .zih-cs-consultation,.zy-consultation-section,.zy-consultation-container,
    .zy-consultation-layout,.zih-cs-editorial,.zih-cs-editorial-body,
    .zih-longtail-sections,.zih-longtail-block,.zih-cs-facts
  ) {min-width:0;max-width:100%;}
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) :is(.zih-cs-section-head,.zih-cs-filters){
    flex-wrap:wrap;min-width:0;max-width:100%;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) :is(img,iframe,video,figure){max-width:100%;}
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) :is(.zih-cs-answer,.zih-cs-faq,.zih-cs-editorial-body){overflow-wrap:anywhere;}
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table-scroll{
    display:block;width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0!important;padding:0!important;overflow-x:auto!important;overflow-y:hidden!important;
    overscroll-behavior-x:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table{
    direction:rtl;table-layout:fixed!important;width:100%!important;max-width:100%!important;
    min-width:0!important;margin:0!important;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table :is(th,td){
    padding-block:10px!important;
    padding-inline-start:14px!important; /* right edge in RTL */
    padding-inline-end:7px!important;   /* left edge in RTL */
    text-align:right!important;vertical-align:middle!important;
    overflow-wrap:anywhere;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table :is(th,td):last-child{
    padding-inline-end:6px!important;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table :is(th,td):first-child{
    padding-inline-start:16px!important;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table :is(th,td) a{
    max-width:100%;white-space:normal;overflow-wrap:anywhere;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table td:last-child a{
    min-width:0!important;max-width:100%!important;padding-inline:8px!important;
  }
}
@media(max-width:380px){
  body.zih-phase-one-shell > .zih-menu-panel.zih-panel-portal{
    width:calc(100vw - 24px)!important;padding-inline:14px!important;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table :is(th,td){
    padding-inline-start:12px!important;padding-inline-end:5px!important;
  }
  body.zih-phase-one-shell :is(.zih-city-service,.zih-local) .zih-cs-table :is(th,td):first-child{
    padding-inline-start:14px!important;
  }
}

/* 0.18.8: reduce the mobile search glyph stroke only; keep its icon dimensions. */
@media (max-width: 899px) {
  .zih-header .zih-mobile-search-trigger svg { stroke-width: 1.45; }
}
