/* Site header menus: For Providers, About, the person button and account menu, the phone menu's
   new parts (spec 2026-11-28 "The header"; About in the same card since round 5, 11/29). Hand-authored, namespaced ca-hm-, loaded
   site-wide from functions.php. Every rule sits under #masthead so legacy theme and
   Elementor button rules ([type=button]:hover and friends) cannot restyle it. Colors:
   teal #009999, dark teal #007a7a, orange #FFA500 labels, slate text. */

#masthead [data-ca-menu][hidden],
#masthead [data-ca-phone-section][hidden],
#masthead [data-ca-ask-cara-wrap][hidden] { display: none !important; }

#masthead .ca-hm-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The bar's menu text uses Outfit, like the approved mockup. */
#masthead #nav-menu,
#masthead .ca-hm-right { font-family: Outfit, sans-serif; }

#masthead .ca-hm-wrap { position: relative; }

/* Chevron toggles beside For Providers and About. */
#masthead .ca-hm-chev {
	display: inline-flex; align-items: center; justify-content: center;
	margin: 0; padding: 4px; min-height: 0; min-width: 0;
	background: none; border: 0; border-radius: 6px; box-shadow: none;
	color: inherit; font: inherit; line-height: 1; cursor: pointer;
}
#masthead .ca-hm-chev:hover,
#masthead .ca-hm-chev:focus { background: #e6f5f5; color: #007a7a; }
#masthead .ca-hm-chev-icon { display: block; transition: transform .15s ease; }
#masthead [aria-expanded="true"] > .ca-hm-chev-icon,
#masthead [aria-expanded="true"] .ca-hm-chev-icon { transform: rotate(180deg); }

#masthead .ca-hm-chev:focus-visible,
#masthead .ca-hm-person:focus-visible,
#masthead .ca-hm-panel a:focus-visible,
#masthead .ca-hm-panel button:focus-visible,
#masthead .ca-hm-phone-btn:focus-visible,
#masthead .ca-hm-phone-toggle:focus-visible,
#masthead .ca-hm-phone-chev:focus-visible { outline: 2px solid #009999; outline-offset: 2px; }
/* A mouse click leaves focus on the button; legacy page CSS draws a dark ring for it. */
#masthead .ca-hm-chev:focus:not(:focus-visible),
#masthead .ca-hm-person:focus:not(:focus-visible),
#masthead .ca-hm-phone-toggle:focus:not(:focus-visible),
#masthead .ca-hm-phone-chev:focus:not(:focus-visible),
#masthead .ca-hm-item--btn:focus:not(:focus-visible),
#masthead .ca-hm-phone-btn:focus:not(:focus-visible) { outline: none; }

/* Dropdown panels. */
#masthead .ca-hm-panel {
	position: absolute; top: calc(100% + 12px); z-index: 60;
	box-sizing: border-box; text-align: left;
	background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
	box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .25);
	font-family: Outfit, sans-serif; font-size: 16px; line-height: 1.35; font-weight: 400; color: #475569;
}
#masthead .ca-hm-panel a { text-decoration: none; }

#masthead .ca-hm-provider { left: 50%; transform: translateX(-50%); width: 320px; overflow: hidden; }
#masthead .ca-hm-provider--two { width: 600px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#masthead .ca-hm-provider:not([hidden]) { display: block; }
#masthead .ca-hm-provider--two:not([hidden]) { display: grid; }

/* About: one column, the For Providers card's look (round 5). */
#masthead .ca-hm-about { left: 50%; transform: translateX(-50%); width: 330px; }
#masthead .ca-hm-about .ca-hm-contact { margin-top: 8px; }

#masthead .ca-hm-col { display: flex; flex-direction: column; gap: 4px; padding: 20px 18px 18px; }
#masthead .ca-hm-col--about { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); height: 100%; box-sizing: border-box; }

#masthead .ca-hm-eyebrow {
	margin: 0; padding: 0 10px 6px; border: 0;
	font-family: Outfit, sans-serif; font-size: 12px; line-height: 16px; font-weight: 600;
	letter-spacing: 1.5px; text-transform: uppercase; color: #FFA500;
}

#masthead .ca-hm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
#masthead .ca-hm-list li { margin: 0; padding: 0; }

#masthead .ca-hm-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; color: #1e293b; }
#masthead .ca-hm-item:hover,
#masthead .ca-hm-item:focus,
#masthead .ca-hm-item[aria-current="page"] { background: #f1f9f9; color: #1e293b; }
#masthead .ca-hm-col--about .ca-hm-item:hover,
#masthead .ca-hm-col--about .ca-hm-item:focus,
#masthead .ca-hm-col--about .ca-hm-item[aria-current="page"] { background: #fff; }
/* Ask Cara is a button (it opens the chat, no page load) dressed as a menu item. */
#masthead .ca-hm-item--btn {
	width: 100%; box-sizing: border-box; margin: 0; border: 0; background: none; box-shadow: none;
	font: inherit; text-align: left; text-transform: none; letter-spacing: normal; cursor: pointer;
}
#masthead .ca-hm-item--btn:hover,
#masthead .ca-hm-item--btn:focus { background: #f1f9f9; color: #1e293b; }
#masthead .ca-hm-icon { flex: none; padding-top: 2px; color: #007a7a; }
#masthead .ca-hm-icon svg { display: block; }
#masthead .ca-hm-text { display: flex; flex-direction: column; min-width: 0; }
#masthead .ca-hm-name { font-size: 16px; line-height: 22px; font-weight: 600; color: #1e293b; }
#masthead .ca-hm-desc { font-size: 13px; line-height: 18px; font-weight: 400; color: #64748b; }

#masthead .ca-hm-contact {
	margin-top: auto; display: flex; align-items: center; justify-content: center;
	height: 44px; box-sizing: border-box; border-radius: 12px; border: 2px solid #007a7a;
	background: #fff; color: #007a7a; font-size: 15px; font-weight: 600;
}
#masthead .ca-hm-provider:not(.ca-hm-provider--two) .ca-hm-contact { margin-top: 12px; }
#masthead .ca-hm-contact:hover,
#masthead .ca-hm-contact:focus { background: #007a7a; color: #fff; }

#masthead .ca-hm-rule { height: 1px; margin: 8px 10px; background: #d1d5db; }
#masthead .ca-hm-signin {
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px; border-radius: 10px; color: #007a7a; font-size: 15px; font-weight: 600;
}
#masthead .ca-hm-signin:hover,
#masthead .ca-hm-signin:focus { background: #fff; color: #007a7a; }

/* Person button (signed out it is the "Sign in" link). */
#masthead .ca-hm-person {
	display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box;
	height: 44px; margin: 0; padding: 0 12px 0 6px;
	border: 2px solid #e5e7eb; border-radius: 999px; background: #fff; box-shadow: none;
	color: #334155; font-family: Outfit, sans-serif; font-size: 16px; line-height: 1; font-weight: 600;
	white-space: nowrap; text-decoration: none; cursor: pointer;
}
#masthead .ca-hm-person:hover,
#masthead .ca-hm-person:focus,
#masthead .ca-hm-person[aria-expanded="true"] { border-color: #007a7a; background: #fff; color: #334155; }
#masthead .ca-hm-person--out { padding: 0 16px 0 10px; color: #007a7a; }
#masthead .ca-hm-person--out:hover,
#masthead .ca-hm-person--out:focus { color: #007a7a; }
#masthead .ca-hm-avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: #e6f5f5; color: #007a7a; flex: none; }
#masthead .ca-hm-person-name { display: inline-block; max-width: 7rem; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }

/* Account menu. */
#masthead .ca-hm-account { right: 0; width: 300px; overflow: hidden; }
#masthead .ca-hm-strip,
#masthead .ca-hm-phone-strip { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
#masthead .ca-hm-strip { padding: 16px 18px; border-bottom: 1px solid #e5e7eb; }
#masthead .ca-hm-initial {
	display: flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px; border-radius: 999px; background: #007a7a;
	color: #fff; font-family: Outfit, sans-serif; font-size: 17px; font-weight: 700;
}
#masthead .ca-hm-who { display: flex; flex-direction: column; min-width: 0; flex: 1; font-family: Outfit, sans-serif; }
#masthead .ca-hm-who-name { font-size: 16px; line-height: 22px; font-weight: 700; color: #1e293b; overflow-wrap: anywhere; }
#masthead .ca-hm-who-email { font-size: 13px; line-height: 18px; color: #64748b; overflow-wrap: anywhere; }

#masthead .ca-hm-acct-list { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; }
#masthead .ca-hm-acct-list li { margin: 0; padding: 0; }
#masthead .ca-hm-acct-link {
	display: flex; align-items: center; gap: 12px; min-height: 44px; box-sizing: border-box; padding: 0 10px;
	border-radius: 10px; color: #1e293b; font-size: 16px; font-weight: 500;
}
#masthead .ca-hm-acct-link svg { flex: none; color: #007a7a; }
/* Version "B" (Chris 11/30): a name and a small grey line under it, like the For Providers items. */
#masthead .ca-hm-acct-link:has(.ca-hm-acct-text) { align-items: flex-start; padding: 8px 10px; }
#masthead .ca-hm-acct-link:has(.ca-hm-acct-text) svg { margin-top: 2px; }
#masthead .ca-hm-acct-text { display: flex; flex-direction: column; min-width: 0; }
#masthead .ca-hm-acct-name { font-size: 16px; line-height: 22px; font-weight: 500; color: #1e293b; }
#masthead .ca-hm-acct-desc { font-size: 13px; line-height: 18px; font-weight: 400; color: #64748b; }
#masthead .ca-hm-acct-link:hover,
#masthead .ca-hm-acct-link:focus,
#masthead .ca-hm-acct-link[aria-current="page"] { background: #f1f9f9; color: #1e293b; }
#masthead .ca-hm-logout,
#masthead .ca-hm-logout:hover,
#masthead .ca-hm-logout:focus { color: #334155; }
#masthead .ca-hm-logout svg { color: #64748b; }
#masthead .ca-hm-acct-list .ca-hm-sep { height: 1px; margin: 6px 4px; background: #e5e7eb; }

/* Phone menu. */
#masthead .ca-hm-phone-strip { margin: 0 16px 4px 0; padding: 14px 16px; border-radius: 12px; }
/* Phone touch targets are at least 44px (Chris 11/27 rule for phones). */
#masthead .ca-hm-phone-account { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-family: Outfit, sans-serif; font-size: 15px; font-weight: 600; color: #007a7a; text-decoration: none; }
#masthead .ca-hm-phone-toggle {
	display: flex; width: 100%; align-items: center; justify-content: space-between; box-sizing: border-box;
	margin: 0; padding: 0 16px 0 0; background: none; border: 0; border-radius: 0; box-shadow: none;
	color: inherit; font: inherit; text-align: left; cursor: pointer;
}
#masthead .ca-hm-phone-toggle:hover,
#masthead .ca-hm-phone-toggle:focus { background: none; color: inherit; }
@media (hover: hover) { #masthead .ca-hm-phone-toggle:hover { font-weight: 700; } }
#masthead .ca-hm-phone-chev { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; padding: 0 12px; background: none; border: 0; box-shadow: none; color: inherit; cursor: pointer; }
#masthead .ca-hm-phone-chev:hover,
#masthead .ca-hm-phone-chev:focus { background: none; color: inherit; }
#masthead .ca-hm-phone-section { display: flex; flex-direction: column; margin: 4px 16px 0 10px; padding: 0 0 8px 14px; border-left: 3px solid #e6f5f5; }
#masthead .ca-hm-phone-section .ca-hm-eyebrow { padding: 10px 10px 6px; }
#masthead .ca-hm-phone-link { display: flex; align-items: center; min-height: 44px; padding: 0 10px; font-family: Outfit, sans-serif; font-size: 16px; font-weight: 500; text-decoration: none; }
#masthead .ca-hm-phone-btn {
	width: 100%; box-sizing: border-box; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	color: inherit; line-height: inherit; text-align: left; text-transform: none; letter-spacing: normal; cursor: pointer;
}
#masthead .ca-hm-phone-btn:hover,
#masthead .ca-hm-phone-btn:focus { background: none; color: inherit; }
#masthead .ca-hm-phone-foot { display: flex; justify-content: flex-start; margin-right: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
#masthead .ca-hm-phone-logout {
	display: inline-flex; align-items: center; height: 44px; box-sizing: border-box; padding: 0 14px;
	border: 2px solid #e5e7eb; border-radius: 12px; color: #334155;
	font-family: Outfit, sans-serif; font-size: 15px; font-weight: 600; text-decoration: none;
}
#masthead .ca-hm-phone-logout:hover,
#masthead .ca-hm-phone-logout:focus { border-color: #007a7a; color: #334155; }

/* Bar width for everyone, signed out included (11/28). Below 1280px the full bar was wider than
   the window and the page scrolled sideways (live 11/28: 844px at 768, 1119px at 1024).
   Signed-in bars get more from the style block in header.php.
   The !important marks are needed: pages that keep the legacy stylesheets (the five /your-listings/
   pages) load theme build/index.css, whose Tailwind utilities are all !important (.lg:text-lg,
   .px-4, .md:space-x-4), so without them those pages kept the full-size bar and ran 40-60px past
   the window from 768 to 1279 (round 2 check, 11/29). Every selector here starts with #masthead,
   so it still wins over those one-class utilities. */
@media (min-width: 768px) and (max-width: 1023.98px) {
	#masthead #nav-menu { font-size: .9375rem !important; line-height: 1.5rem !important; }
	#masthead #nav-menu > :not([hidden]) ~ :not([hidden]) { margin-left: .375rem !important; }
	/* Favorites drops its heart; signed in, the person button shows just its icon (signed out it keeps "Sign in"); the hub button shows just its shield. Hidden words stay for screen readers. */
	#masthead .ca-hm-fav-heart { display: none; }
	#masthead #nav-menu { padding-left: 0 !important; padding-right: 0 !important; }
	#masthead #ca-search-input { padding-left: .625rem !important; padding-right: .625rem !important; }
	#masthead .ca-hm-right { padding-left: 4px !important; padding-right: 4px !important; }
	#masthead .ca-hm-person { gap: 4px; padding: 0 6px; }
	#masthead .ca-hm-person > .ca-hm-chev-icon { display: none; }
	#masthead .ca-hm-person--out { padding: 0 8px 0 6px; }
	#masthead .ca-hm-person:not(.ca-hm-person--out) .ca-hm-person-label,
	#masthead .ca-hub-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
	#masthead #logodiv img { width: 150px !important; }
	#masthead #nav-menu { font-size: .9375rem !important; line-height: 1.5rem !important; }
	#masthead #nav-menu > :not([hidden]) ~ :not([hidden]) { margin-left: .75rem !important; }
}

@media print {
	#masthead .ca-hm-panel { display: none !important; }
}
