/*
  Yondr Concept 4 — Floating Capsule Mobile Header
  Scope: mobile logged-in header only. Desktop header remains unchanged.
  Purpose: make mobile web feel like an app shell while preserving existing Yondr colors/buttons/actions.
*/
:root{
  --ymch-ink:#11162f;
  --ymch-muted:#6e7390;
  --ymch-line:rgba(43,45,66,.10);
  --ymch-card:#ffffff;
  --ymch-bg:#f6f7fc;
  --ymch-blue:#1b6dff;
  --ymch-purple:#8f35ff;
  --ymch-gradient:linear-gradient(135deg,#176bff 0%,#3158ff 42%,#8f35ff 100%);
  --ymch-shadow:0 18px 44px rgba(17,22,47,.13);
  --ymch-shadow-sm:0 9px 26px rgba(17,22,47,.09);
}
.yonder-header-hidden-action{display:none!important;visibility:hidden!important;pointer-events:none!important;}
nav#nav-logged-in .nav-wrapper.container-fluid,
nav#nav-logged-in .nav-wrapper.container{position:relative;}
.yondr-desktop-page-title{
  position:absolute;
  left:50%;
  top:50%;
  z-index:3;
  transform:translate(-50%,-50%);
  height:40px;
  min-width:130px;
  max-width:min(360px,calc(100vw - 560px));
  padding:0 18px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(247,248,255,.96);
  border:1px solid rgba(116,86,255,.12);
  box-shadow:0 8px 20px rgba(25,35,80,.12);
  color:var(--ymch-ink,#11162f);
  pointer-events:none;
  overflow:hidden;
  white-space:nowrap;
}
.yondr-desktop-page-title-text{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:17px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.035em;
}
@media (max-width:1100px) and (min-width:769px){
  .yondr-desktop-page-title{max-width:220px;min-width:108px;padding:0 14px;}
  .yondr-desktop-page-title-text{font-size:15px;}
}
@media (max-width:768px){.yondr-desktop-page-title{display:none!important;}}
.ymch-mobile-header{display:none;}
@media (max-width:768px){
  body.ymch-has-mobile-header{
    background:var(--ymch-bg) !important;
    padding-top:calc(76px + env(safe-area-inset-top)) !important;
  }
  body.ymch-has-mobile-header > #container{
    padding-top:0 !important;
  }
  body.ymch-has-mobile-header.ymch-dropdown-open{
    padding-top:calc(142px + env(safe-area-inset-top)) !important;
  }
  body.ymch-has-mobile-header nav#nav-logged-in{
    position:absolute !important;
    top:-9999px !important;
    left:-9999px !important;
    height:1px !important;
    width:1px !important;
    overflow:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    margin:0 !important;
    border:0 !important;
    box-shadow:none !important;
  }
  .ymch-mobile-header{
    display:block;
    position:fixed;
    top:calc(8px + env(safe-area-inset-top));
    left:0;
    right:0;
    z-index:1200;
    pointer-events:none;
    padding:0 10px;
  }
  .ymch-mobile-header *{box-sizing:border-box;}
  .ymch-top-capsule,
  .ymch-chip-capsule{
    pointer-events:auto;
    width:100%;
    max-width:680px;
    margin:0 auto;
    background:rgba(255,255,255,.93);
    border:1px solid rgba(255,255,255,.76);
    box-shadow:var(--ymch-shadow);
    -webkit-backdrop-filter:blur(22px);
    backdrop-filter:blur(22px);
  }
  .ymch-top-capsule{
    min-height:58px;
    padding:8px 9px 8px 13px;
    border-radius:30px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    position:relative;
  }
  .ymch-brand{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    min-width:98px;
    height:42px;
    padding-right:6px;
    overflow:visible;
    text-decoration:none !important;
  }
  .ymch-brand span{
    display:inline-block;
    font-weight:1000;
    font-size:20px;
    letter-spacing:-.055em;
    font-style:italic;
    line-height:1;
    color:var(--ymch-blue);
    background:var(--ymch-gradient);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    text-transform:uppercase;
  }
  .ymch-page-title{
    appearance:none;
    position:absolute;
    left:50%;
    top:50%;
    z-index:2;
    transform:translate(-50%,-50%);
    border:1px solid rgba(116,86,255,.12);
    background:rgba(247,248,255,.96);
    flex:0 1 auto;
    min-width:110px;
    max-width:calc(100% - 210px);
    height:38px;
    padding:0 13px 0 15px;
    border-radius:999px;
    box-shadow:0 8px 20px rgba(25,35,80,.12);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:3px;
    color:var(--ymch-ink);
    font-size:18px;
    line-height:1;
    font-weight:950;
    letter-spacing:-.04em;
    cursor:pointer;
    text-align:center;
    overflow:hidden;
    white-space:nowrap;
    transition:transform .16s ease, background .16s ease, box-shadow .16s ease, border-color .16s ease;
  }
  .ymch-page-title:hover,
  .ymch-page-title:focus{background:#fff;box-shadow:0 10px 24px rgba(25,35,80,.14);transform:translate(-50%,-52%);}
  .ymch-page-title-text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .ymch-page-title svg{color:#59617e;opacity:.75;}
  .ymch-actions{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:5px;
  }
  .ymch-icon-btn{
    position:relative;
    width:36px;
    height:36px;
    border:0;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:transparent;
    color:var(--ymch-ink) !important;
    padding:0;
    text-decoration:none !important;
    cursor:pointer;
    transition:transform .16s ease, background .16s ease, box-shadow .16s ease;
  }
  .ymch-icon-btn:hover,
  .ymch-icon-btn:focus{background:rgba(27,109,255,.08);transform:translateY(-1px);}
  .ymch-icon-btn svg{width:22px;height:22px;display:block;}
  .ymch-dot{
    position:absolute;
    top:0;
    right:0;
    min-width:17px;
    height:17px;
    padding:0 4px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--ymch-gradient);
    color:#fff;
    font-size:10px;
    font-weight:1000;
    line-height:17px;
    border:2px solid #fff;
    box-shadow:0 5px 12px rgba(49,88,255,.25);
  }
  .ymch-avatar{
    flex:0 0 auto;
    width:38px;
    height:38px;
    border-radius:50%;
    display:block;
    overflow:hidden;
    padding:2px;
    background:var(--ymch-gradient);
    box-shadow:0 8px 18px rgba(49,88,255,.18);
  }
  .ymch-avatar img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    border-radius:50%;
    background:#fff;
  }
  .ymch-chip-capsule{
    margin-top:8px;
    border-radius:28px;
    padding:9px 10px 8px;
    opacity:0;
    transform:translateY(-10px) scale(.985);
    max-height:0;
    overflow:hidden;
    pointer-events:none;
    visibility:hidden;
    transition:opacity .18s ease, transform .18s ease, max-height .18s ease, visibility .18s ease;
  }
  .ymch-mobile-header.is-menu-open .ymch-chip-capsule{
    opacity:1;
    transform:translateY(0) scale(1);
    max-height:112px;
    pointer-events:auto;
    visibility:visible;
  }
  .ymch-mobile-header.is-menu-open .ymch-page-title svg{
    transform:rotate(180deg);
  }
  .ymch-page-title svg{transition:transform .16s ease;}
  .ymch-chip-track{
    display:flex;
    align-items:center;
    gap:9px;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:0 2px 4px;
  }
  .ymch-chip-track::-webkit-scrollbar{display:none;}
  .ymch-chip{
    flex:0 0 auto;
    min-width:86px;
    min-height:54px;
    padding:7px 11px 7px;
    border-radius:19px;
    display:inline-flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    text-decoration:none !important;
    background:rgba(255,255,255,.88);
    border:1px solid rgba(43,45,66,.08);
    box-shadow:var(--ymch-shadow-sm);
    color:var(--ymch-ink) !important;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  }
  .ymch-chip:hover,
  .ymch-chip:focus{transform:translateY(-1px);box-shadow:0 14px 34px rgba(17,22,47,.12);}
  .ymch-chip b{
    display:block;
    max-width:108px;
    font-size:11px;
    line-height:1.05;
    font-weight:950;
    letter-spacing:-.015em;
    white-space:normal;
    text-align:center;
  }
  .ymch-chip.is-active{
    min-width:78px;
    color:#fff !important;
    background:var(--ymch-gradient);
    border-color:rgba(255,255,255,.50);
    box-shadow:0 15px 34px rgba(49,88,255,.30), inset 0 1px 0 rgba(255,255,255,.35);
  }
  .ymch-chip-icon{
    width:24px;
    height:24px;
    position:relative;
    display:block;
    color:currentColor;
  }
  .ymch-chip-icon:before,
  .ymch-chip-icon:after{content:"";position:absolute;box-sizing:border-box;}
  .ymch-icon-spark:before{inset:3px;background:currentColor;clip-path:polygon(50% 0,62% 37%,100% 50%,62% 63%,50% 100%,38% 63%,0 50%,38% 37%);}
  .ymch-icon-globe:before{inset:2px;border:2px solid currentColor;border-radius:50%;}
  .ymch-icon-globe:after{left:10px;top:2px;width:4px;height:20px;border-left:1.8px solid currentColor;border-right:1.8px solid currentColor;border-radius:50%;}
  .ymch-icon-pin:before{left:5px;top:2px;width:14px;height:14px;border:2px solid currentColor;border-radius:50% 50% 50% 0;transform:rotate(-45deg);}
  .ymch-icon-pin:after{left:10px;top:7px;width:4px;height:4px;background:currentColor;border-radius:50%;}
  .ymch-icon-people:before{left:3px;top:9px;width:18px;height:10px;border:2px solid currentColor;border-radius:10px 10px 4px 4px;}
  .ymch-icon-people:after{left:6px;top:2px;width:12px;height:12px;border:2px solid currentColor;border-radius:50%;background:transparent;}
  .ymch-icon-target:before{inset:2px;border:2px solid currentColor;border-radius:50%;}
  .ymch-icon-target:after{left:9px;top:9px;width:6px;height:6px;border-radius:50%;background:currentColor;box-shadow:0 0 0 5px transparent;border:1px solid currentColor;}
  .ymch-icon-calendar:before{left:3px;top:5px;width:18px;height:16px;border:2px solid currentColor;border-radius:5px;}
  .ymch-icon-calendar:after{left:6px;top:2px;width:12px;height:6px;border-left:2px solid currentColor;border-right:2px solid currentColor;}
  .ymch-icon-heart:before{left:4px;top:5px;width:16px;height:14px;background:currentColor;clip-path:path('M12 21s-7-4.4-9.4-8.7C.3 8.4 2.5 5 5.8 5c1.9 0 3.1 1 3.9 2 0 0 1.3-2 3.9-2 3.3 0 5.5 3.4 3.2 7.3C14.4 16.6 12 21 12 21z');}
  .ymch-icon-bolt:before{left:7px;top:2px;width:11px;height:20px;background:currentColor;clip-path:polygon(55% 0,0 58%,42% 58%,25% 100%,100% 38%,57% 38%);}
  .ymch-icon-flame:before{left:6px;top:2px;width:13px;height:19px;background:currentColor;clip-path:path('M12 22c-4.4 0-7-3.1-7-6.8 0-2.7 1.5-4.7 3.3-6.2.5 2.1 1.9 3.3 3.2 3.8-.5-3.2.9-6.2 3.5-8.8.2 3.1 1.8 4.9 3.3 6.5 1.4 1.5 2.7 3 2.7 5.2C21 19.3 18.2 22 12 22z');}
  .ymch-icon-likes:before{left:4px;top:6px;width:16px;height:14px;background:currentColor;clip-path:path('M12 21s-7-4.4-9.4-8.7C.3 8.4 2.5 5 5.8 5c1.9 0 3.1 1 3.9 2 0 0 1.3-2 3.9-2 3.3 0 5.5 3.4 3.2 7.3C14.4 16.6 12 21 12 21z');opacity:.95;}
  .ymch-icon-eye:before{left:2px;top:6px;width:20px;height:12px;border:2px solid currentColor;border-radius:60% 60% 60% 60% / 75% 75% 75% 75%;transform:rotate(0deg);}
  .ymch-icon-eye:after{left:9px;top:9px;width:6px;height:6px;background:currentColor;border-radius:50%;}
  .ymch-scroll-indicator{
    display:block;
    width:76px;
    height:4px;
    margin:3px auto 0;
    border-radius:999px;
    background:rgba(43,45,66,.10);
    overflow:hidden;
  }
  .ymch-scroll-indicator i{display:block;width:42%;height:100%;border-radius:999px;background:var(--ymch-gradient);}
  body.ymch-has-mobile-header.side_open .ymch-mobile-header{transform:translateX(0);}
}
@media (max-width:380px){
  .ymch-top-capsule{padding-left:10px;gap:5px;}
  .ymch-brand{min-width:86px;padding-right:4px;}
  .ymch-brand span{font-size:18px;}
  .ymch-page-title{font-size:16px;min-width:92px;max-width:calc(100% - 185px);height:36px;padding:0 10px 0 12px;}
  .ymch-actions{gap:4px;}
  .ymch-icon-btn{width:33px;height:33px;}
  .ymch-icon-btn svg{width:20px;height:20px;}
  .ymch-avatar{width:34px;height:34px;}
  .ymch-chip{min-width:70px;min-height:54px;border-radius:18px;}
  .ymch-chip b{font-size:10.8px;}
}


/* Route-specific spacing: Hot or Not keeps the same compact app header. The section menu is still available by tapping the title button. */
@media (max-width:768px){
  body.ymch-route-hot{
    padding-top:calc(76px + env(safe-area-inset-top)) !important;
  }
  body.ymch-route-hot.ymch-dropdown-open{
    padding-top:calc(142px + env(safe-area-inset-top)) !important;
  }
  body.ymch-route-hot .ymch-top-capsule{
    min-height:56px;
  }
  body.ymch-route-hot .ymch-page-title{
    font-size:18px;
    letter-spacing:-.045em;
  }
  body.ymch-route-hot #yondr_voice_inbox_fab,
  body.ymch-route-hot .yondr_voice_inbox_fab,
  body.ymch-route-hot #yondr_ready_mobile_home_hub{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
}

/* Yondr header logo clipping fix — keep the current header design, but give the brand enough room. */
nav#nav-logged-in .header_logo,
nav#nav-logged-in #logo-container.header_logo {
  min-width: 132px !important;
  max-width: 152px !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
  position: relative;
  z-index: 4;
}
nav#nav-logged-in .header_logo img,
nav#nav-logged-in #logo-container.header_logo img {
  display: block;
  width: 100% !important;
  max-width: none !important;
  object-fit: contain;
}
@media (max-width:768px){
  .ymch-top-capsule{overflow:visible;}
  .ymch-brand{
    min-width:112px !important;
    max-width:122px;
    padding-right:12px !important;
    overflow:visible !important;
    flex:0 0 auto !important;
    flex-shrink:0 !important;
    position:relative;
    z-index:4;
  }
  .ymch-brand span{
    white-space:nowrap !important;
    overflow:visible !important;
    padding-right:3px;
  }
  .ymch-actions{
    min-width:84px;
    position:relative;
    z-index:4;
  }
  .ymch-page-title{
    max-width:calc(100% - 238px) !important;
    z-index:2;
  }
}
@media (max-width:380px){
  .ymch-brand{min-width:98px !important;max-width:106px;padding-right:9px !important;}
  .ymch-brand span{font-size:18px;letter-spacing:-.055em;}
  .ymch-actions{min-width:75px;}
  .ymch-page-title{max-width:calc(100% - 206px) !important;min-width:82px;}
}

/* Yondr logo final clipping guard — no redesign, only spacing/overflow correction. */
nav#nav-logged-in,
nav#nav-logged-in .nav-wrapper,
nav#nav-logged-in .nav-wrapper.container-fluid,
nav#nav-logged-in .nav-wrapper.container {
  overflow: visible !important;
}
nav#nav-logged-in .header_logo,
nav#nav-logged-in #logo-container.header_logo {
  width: auto !important;
  min-width: 156px !important;
  max-width: none !important;
  padding-right: 14px !important;
  margin-right: 34px !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 8 !important;
}
nav#nav-logged-in .header_logo img,
nav#nav-logged-in #logo-container.header_logo img {
  display: block !important;
  width: auto !important;
  max-width: 156px !important;
  height: auto !important;
  max-height: 42px !important;
  object-fit: contain !important;
  object-position: left center !important;
  overflow: visible !important;
}
@media (max-width: 768px) {
  .ymch-mobile-header,
  .ymch-top-capsule {
    overflow: visible !important;
  }
  .ymch-top-capsule {
    gap: 6px !important;
  }
  .ymch-brand {
    width: max-content !important;
    min-width: 118px !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 16px !important;
    margin-right: 0 !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 8 !important;
  }
  .ymch-brand span {
    display: inline-block !important;
    width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    padding-right: .32em !important;
    margin-right: -.08em !important;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }
  .ymch-page-title {
    z-index: 3 !important;
    min-width: 0 !important;
    width: max-content !important;
    max-width: clamp(88px, calc(100% - 270px), 180px) !important;
  }
  .ymch-actions {
    min-width: 84px !important;
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 8 !important;
  }
}
@media (max-width: 380px) {
  .ymch-brand {
    min-width: 108px !important;
    padding-right: 12px !important;
    max-width: none !important;
  }
  .ymch-brand span {
    padding-right: .34em !important;
  }
  .ymch-page-title {
    max-width: clamp(78px, calc(100% - 245px), 130px) !important;
    font-size: 16px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .ymch-actions {
    min-width: 76px !important;
  }
}
