/* Menu público: card flutuante escolhido pela clínica. */
:root{--pc-head:146px}
.header.wrap.header-floating{
  --menu-surface:#fff3f8;--menu-border:#ddbbce;--menu-shadow:0 10px 32px #75465712;
  position:sticky;top:16px;z-index:30;display:flex;align-items:center;flex-wrap:nowrap;
  width:min(1320px,calc(100% - 48px));min-height:0;gap:24px;margin:16px auto 0;
  padding:10px 24px;border:1px solid var(--menu-border);border-radius:24px;
  background:var(--menu-surface);box-shadow:var(--menu-shadow);backdrop-filter:none;
}
html[data-theme=dark] .header.wrap.header-floating{
  --menu-surface:#2a222b;--menu-border:#59414f;--menu-shadow:0 10px 32px #00000024;
}
.header.wrap.header-floating>.brand{order:0;flex:none;min-width:0;border-radius:12px}
.header.wrap.header-floating .brand-image .brand-crop{width:156px}
.header.wrap.header-floating>.header-controls{order:1;display:flex;flex:none;gap:10px;margin:0;align-items:center}
.header.wrap.header-floating .theme-toggle.theme-switch{width:80px;height:44px;min-height:44px;padding:3px}
.header.wrap.header-floating .theme-switch .theme-side{padding:0;gap:0}
.header.wrap.header-floating .theme-switch .theme-side-label{display:none}
.header.wrap.header-floating .menu-button{display:none}
.header.wrap.header-floating .menu-close-icon{display:none}
.header.wrap.header-floating>#navigation,
.header.wrap.header-floating>#navigation.collapsible:not(.is-open),
.header.wrap.header-floating>#navigation.collapsible.is-open{
  position:static;display:flex;order:2;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;
  align-items:center;justify-content:space-between;gap:4px;width:auto;max-height:none;
  margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;
}
.header.wrap.header-floating #navigation .nav-link{
  display:inline-flex;align-items:center;justify-content:center;flex:none;width:auto;
  min-height:44px;margin:0;padding:10px 11px;border:1px solid transparent;border-radius:12px;
  color:var(--ink);background:transparent;font-size:.875rem;font-weight:400;line-height:1.4;
  white-space:nowrap;text-align:center;text-decoration:none;transform:none;
  transition:background .18s ease,border-color .18s ease,color .18s ease;
}
.header.wrap.header-floating #navigation .nav-link:hover{background:var(--soft);color:var(--rose);text-decoration:none}
.header.wrap.header-floating #navigation .nav-link.is-current:not(.button){color:var(--rose);font-weight:700}
.header.wrap.header-floating #navigation .nav-link.account-entry{margin-left:12px;font-weight:600}
.header.wrap.header-floating #navigation .nav-link.account-register{
  margin-left:0;margin-right:8px;padding-inline:18px;border-color:var(--rose);color:var(--rose);border-radius:15px;
}
.header.wrap.header-floating #navigation .nav-link.button{
  gap:10px;min-height:48px;padding:12px 18px;border-radius:15px;border-color:var(--rose);
  background:var(--rose);color:var(--paper);font-weight:600;
}
.header.wrap.header-floating #navigation .nav-link.button:hover{filter:brightness(.95)}
.header.wrap.header-floating .menu-book-arrow{flex:none;width:18px;height:18px}
.header.wrap.header-floating :is(a,button):focus-visible{outline:2px solid var(--rose);outline-offset:4px}
@media(min-width:1181px) and (max-width:1320px){
  .header.wrap.header-floating{gap:16px;padding-inline:20px}
  .header.wrap.header-floating .brand-image .brand-crop{width:144px}
  .header.wrap.header-floating #navigation .nav-link{padding-inline:8px}
  .header.wrap.header-floating #navigation .nav-link.account-entry{margin-left:6px}
  .header.wrap.header-floating #navigation .nav-link.account-register{padding-inline:14px;margin-right:4px}
  .header.wrap.header-floating #navigation .nav-link.button{padding-inline:16px}
}
@media(max-width:1180px){
  :root{--pc-head:130px}
  .header.wrap.header-floating{gap:12px;padding:8px 18px;top:12px;margin-top:12px;border-radius:22px}
  .header.wrap.header-floating .brand-image .brand-crop{width:136px}
  .header.wrap.header-floating>.header-controls{margin-left:auto;gap:12px}
  .header.wrap.header-floating .header-controls .menu-button:not([hidden]){
    display:inline-flex;align-items:center;justify-content:center;flex:none;
    width:44px;height:44px;min-width:44px;min-height:44px;padding:0;
    border:1px solid transparent;border-radius:50%;background:transparent;color:var(--ink);
  }
  .header.wrap.header-floating .menu-button:hover{background:var(--soft)}
  .header.wrap.header-floating .header-controls .menu-button[aria-expanded=true]:not([hidden]){background:var(--soft);color:var(--rose)}
  .header.wrap.header-floating .menu-button[aria-expanded=true] .menu-open-icon{display:none}
  .header.wrap.header-floating .menu-button[aria-expanded=true] .menu-close-icon{display:block}
  .header.wrap.header-floating>#navigation.collapsible:not(.is-open){display:none}
  .header.wrap.header-floating>#navigation.collapsible.is-open{
    position:absolute;top:calc(100% + 10px);left:auto;right:0;z-index:31;
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;
    gap:0 10px;width:min(380px,100%);max-height:calc(100dvh - var(--pc-head) - 22px);
    margin:0;padding:16px;border:1px solid var(--menu-border);border-radius:22px;
    background:var(--menu-surface);box-shadow:0 18px 44px #00000028;
    overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--menu-border) transparent;
  }
  .header.wrap.header-floating #navigation .nav-link{
    grid-column:1/-1;justify-content:space-between;min-width:0;width:100%;min-height:52px;
    margin:0;padding:14px 10px;white-space:normal;text-align:left;font-size:.9375rem;
    border:0;border-bottom:1px solid var(--line);border-radius:0;
  }
  .header.wrap.header-floating #navigation .nav-link:not(.account-entry):not(.button)::after{
    content:"";width:7px;height:7px;margin-right:3px;margin-left:14px;flex:none;
    border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:rotate(45deg);opacity:.75;
  }
  .header.wrap.header-floating #navigation .nav-link.account-entry{
    grid-column:auto;justify-content:center;min-height:46px;margin:16px 0 0;padding:11px 8px;
    border:1px solid var(--menu-border);border-radius:13px;text-align:center;font-weight:600;
  }
  .header.wrap.header-floating #navigation .nav-link.account-register{border-color:var(--rose);color:var(--rose)}
  .header.wrap.header-floating #navigation .nav-link.button{
    justify-content:center;gap:16px;min-height:48px;margin:10px 0 0;padding:12px;
    border:1px solid var(--rose);border-radius:13px;text-align:center;
  }
  /* Sem JavaScript os links continuam disponíveis. */
  .header.wrap.header-floating:has(>#navigation:not(.collapsible)){flex-wrap:wrap}
  .header.wrap.header-floating>#navigation:not(.collapsible){flex-basis:100%;display:flex;flex-wrap:wrap;justify-content:flex-start}
  .header.wrap.header-floating>#navigation:not(.collapsible) .nav-link{width:auto}
}
@media(max-width:600px){
  :root{--pc-head:116px}
  .header.wrap.header-floating{width:calc(100% - 24px);top:10px;margin-top:10px;gap:8px;padding:8px 12px;border-radius:20px}
  .header.wrap.header-floating .brand-image .brand-crop{width:124px}
  .header.wrap.header-floating>.header-controls{gap:6px}
  .header.wrap.header-floating .theme-toggle.theme-switch{width:76px}
  .header.wrap.header-floating>#navigation.collapsible.is-open{left:0;right:0;width:100%;padding:14px;border-radius:20px}
}
@media(max-width:350px){
  :root{--pc-head:112px}
  .header.wrap.header-floating{padding-inline:10px}
  .header.wrap.header-floating .brand-image .brand-crop{width:116px}
}
@media(prefers-reduced-motion:reduce){
  .header.wrap.header-floating #navigation .nav-link,.header.wrap.header-floating .theme-switch-thumb{transition:none}
}

/* A single account action when the server confirms an active portal session. */
.header.wrap.header-floating #navigation .account-entry[hidden]{display:none!important}
.header.wrap.header-floating #navigation[data-account-state="pending"] .account-entry{visibility:hidden}
.header.wrap.header-floating #navigation .nav-link.account-current{border:1px solid var(--rose);color:var(--rose);border-radius:15px;padding-inline:18px}
@media(max-width:1180px){
  .header.wrap.header-floating #navigation .nav-link.account-current{grid-column:1/-1}
}
