/*
 * The course header (tMP Core 2.15.0 / tMP Site 1.10.0).
 *
 * ONE header for a course, wherever the golfer is: its own website (tMP Site), its storefront, cart,
 * checkout and My Account on the Middle Pin. This file ships in both plugins byte for byte (a test
 * holds them equal), so moving between the two changes nothing at the top of the page.
 *
 *   [logo  Course name]              [book]  [pill]  [ member card | bag ]  [menu]
 *   ─────────────────────────────────────────────────────────────────────────────
 *   Home  About Us  Shop  Visit …        (the site's pages, or the store's departments)
 *
 * Colours come in as custom properties on .tmp-ch, set from the course's brand by each plugin.
 */

.tmp-ch {
	--ch-paper: #F5F2EA; --ch-card: #FFFDF8; --ch-tint: #EFEBE1; --ch-ink: #0F2029; --ch-ink2: #3C4C55; --ch-accent: #58B4E5;
	--ch-line: rgba(15, 32, 41, 0.14); --ch-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	position: sticky; top: 0; z-index: 990; margin: 0; padding: 0; box-sizing: border-box; text-align: left;
	background: color-mix(in srgb, var(--ch-paper) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--ch-line); color: var(--ch-ink);
	font-family: var(--ch-sans) !important; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
body.admin-bar .tmp-ch { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tmp-ch { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .tmp-ch { top: 0; } }
.tmp-ch *, .tmp-ch *::before, .tmp-ch *::after { box-sizing: border-box; }
.tmp-ch a, .tmp-ch button, .tmp-ch summary { font-family: var(--ch-sans) !important; text-decoration: none !important; letter-spacing: 0 !important; text-transform: none !important; box-shadow: none; }
.tmp-ch a:focus-visible, .tmp-ch summary:focus-visible { outline: 2px solid var(--ch-accent); outline-offset: 3px; border-radius: 6px; }
.tmp-ch svg { display: block; }

.tmp-ch__in { max-width: 1200px; margin: 0 auto; padding: 0 40px; height: 68px; display: flex; align-items: center; gap: 12px; }
.tmp-ch__brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ch-ink) !important; }
.tmp-ch__brand img { height: 44px !important; width: auto !important; max-width: 120px !important; object-fit: contain; display: block; margin: 0 !important; flex-shrink: 0; }
.tmp-ch__name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmp-ch__grow { flex: 1 1 auto; }

/* The booking icon: straight to the course's tee sheet. */
.tmp-ch__book { position: relative; flex-shrink: 0; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ch-line); border-radius: 8px; background: var(--ch-card); color: var(--ch-ink) !important; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.tmp-ch__book:hover { background: var(--ch-tint); border-color: rgba(15, 32, 41, 0.22); transform: translateY(-1px); }
.tmp-ch__book .tmp-ch__flag { transform-origin: 14px 13px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.tmp-ch__book:hover .tmp-ch__flag { transform: rotate(-8deg); }

/* The pill: back to the course's website from the Middle Pin, or its phone number on the website. */
.tmp-ch__pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border: 1px solid rgba(15, 32, 41, 0.3); border-radius: 8px; background: transparent; color: var(--ch-ink) !important; font-size: 15px; font-weight: 500; white-space: nowrap; transition: background .15s ease; }
.tmp-ch__pill:hover { background: rgba(15, 32, 41, 0.05); }
.tmp-ch__short { display: none; }

/* The member card with the bag fused to its right end. */
.tmp-ch__me { flex-shrink: 0; display: inline-flex; align-items: stretch; border-radius: 12px; }
.tmp-me { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; white-space: nowrap; font-family: var(--ch-sans, inherit); }
.tmp-me--out { height: 42px; padding: 0 16px 0 14px; border-radius: 12px 0 0 12px; border: 1px solid rgba(15, 32, 41, 0.22); border-right: 0; color: var(--ch-ink, #0F2029) !important; background: rgba(255, 255, 255, 0.6); font-weight: 600; font-size: 14px; transition: background .15s ease; }
.tmp-me--out i { font-style: normal; opacity: .35; margin: 0 2px; }
.tmp-me--out:hover { background: #fff; }
.tmp-me--in { position: relative; overflow: hidden; height: 46px; padding: 0 16px 0 6px; border-radius: 12px 0 0 12px; color: #fff !important; background: linear-gradient(135deg, var(--ch-ink, #0F2029) 0%, color-mix(in srgb, var(--ch-ink, #0F2029) 78%, #3a6b5a) 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset; }
.tmp-me--in::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ch-accent, #C9A45C); opacity: .9; }
.tmp-me--in::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent); transform: skewX(-18deg); animation: tmp-ch-shine 1.6s .5s ease-out 1 both; pointer-events: none; }
@keyframes tmp-ch-shine { to { left: 130%; } }
.tmp-me__av { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; background: var(--ch-accent, #C9A45C); color: var(--ch-ink, #0F2029); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.tmp-me__av img { width: 100%; height: 100%; object-fit: cover; }
.tmp-me__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.1; }
.tmp-me__hi { font-size: 14px; font-weight: 600; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.tmp-me__sub { font-size: 10.5px; letter-spacing: .08em !important; text-transform: uppercase !important; opacity: .7; } .tmp-me__sub b { font-weight: 400; opacity: .6; }

.tmp-ch__bag { position: relative; flex-shrink: 0; width: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 0 12px 12px 0; color: #fff !important; background: color-mix(in srgb, var(--ch-ink, #0F2029) 86%, #fff); border-left: 1px solid rgba(255, 255, 255, .14); transition: background .15s ease; }
.tmp-ch__me:has(.tmp-me--out) .tmp-ch__bag { height: 42px; width: 44px; color: var(--ch-ink) !important; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(15, 32, 41, 0.22); }
.tmp-ch__bag:hover { background: color-mix(in srgb, var(--ch-ink, #0F2029) 72%, #fff); }
.tmp-ch__me:has(.tmp-me--out) .tmp-ch__bag:hover { background: #fff; }
.tmp-ch__bagi { transform-origin: 50% 20%; animation: tmp-ch-bag-in .7s .35s cubic-bezier(.3, 1.5, .5, 1) both; }
.tmp-ch__bag:hover .tmp-ch__bagi, .tmp-ch__bag.is-bump .tmp-ch__bagi { animation: tmp-ch-bag-swing .7s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes tmp-ch-bag-in { from { transform: translateY(-6px) scale(.6); opacity: 0; } }
@keyframes tmp-ch-bag-swing { 20% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 70% { transform: rotate(-5deg); } 100% { transform: none; } }
.tmp-ch__count { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; border: 2px solid var(--ch-paper); background: var(--ch-accent); color: var(--ch-ink); font-size: 10px; font-weight: 700; line-height: 15px; text-align: center; animation: tmp-ch-count .5s .8s cubic-bezier(.3, 1.8, .5, 1) both; }
.tmp-ch__count[hidden] { display: none; }
.tmp-ch__bag.is-bump .tmp-ch__count { animation: tmp-ch-count .5s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes tmp-ch-count { from { transform: scale(0); } }

/* The greeting typed into the card (the script lives with each plugin). */
.tmp-greet__w { display: inline-block; white-space: nowrap; }
.tmp-greet.is-typing .tmp-greet__c { display: none; }
.tmp-greet.is-typing .tmp-greet__c.is-on { display: inline-block; animation: tmp-ch-greet-in .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes tmp-ch-greet-in { from { opacity: 0; transform: translateY(.3em); } }
.tmp-greet.is-typing .tmp-greet__sp.is-on { width: .28em; }
.tmp-greet.is-typed .tmp-greet__c { display: inline; }
.tmp-greet__caret { display: inline-block; width: 2px; height: .95em; margin-left: 2px; vertical-align: -.1em; background: currentColor; animation: tmp-ch-blink .9s steps(1) infinite; }
.tmp-greet.is-typed .tmp-greet__caret { animation: none; opacity: 0; transition: opacity .4s ease; }
@keyframes tmp-ch-blink { 50% { opacity: 0; } }

/* The menu (phones). */
.tmp-ch__menu { position: relative; flex-shrink: 0; display: none; }
.tmp-ch__menu > summary { list-style: none; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ch-line); border-radius: 8px; background: var(--ch-card); color: var(--ch-ink); cursor: pointer; }
.tmp-ch__menu > summary::-webkit-details-marker { display: none; }
.tmp-ch__menu nav { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--ch-card); border: 1px solid var(--ch-line); border-radius: 12px; padding: 8px; box-shadow: 0 24px 40px -20px rgba(15, 32, 41, .35); display: flex; flex-direction: column; }
.tmp-ch__menu nav a { color: var(--ch-ink2) !important; font-size: 15px; padding: 10px 14px; border-radius: 8px; }
.tmp-ch__menu nav a:hover { background: var(--ch-tint); color: var(--ch-ink) !important; }

/* The row underneath: the site's pages, or the store's departments. */
.tmp-ch__bar { border-top: 1px solid var(--ch-line); }
.tmp-ch__bar-in { max-width: 1200px; margin: 0 auto; padding: 0 40px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tmp-ch__bar-in::-webkit-scrollbar { display: none; }
.tmp-ch__bar a { position: relative; flex-shrink: 0; padding: 13px 14px; font-size: 14.5px; font-weight: 500; line-height: 1.4; color: var(--ch-ink2) !important; white-space: nowrap; border-radius: 8px; transition: color .15s; }
.tmp-ch__bar a:first-child { margin-left: -14px; }
.tmp-ch__bar a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--ch-ink); transform: scaleX(0); transition: transform .18s ease; }
.tmp-ch__bar a:hover { color: var(--ch-ink) !important; }
.tmp-ch__bar a:hover::after { transform: scaleX(.4); }
.tmp-ch__bar a.is-on { color: var(--ch-ink) !important; font-weight: 600; }
.tmp-ch__bar a.is-on::after { transform: scaleX(1); }

@media (max-width: 940px) {
	.tmp-ch__in { height: 60px; padding: 0 20px; gap: 10px; }
	.tmp-ch__brand { flex: 1 1 auto; gap: 10px; }
	.tmp-ch__brand img { height: 38px !important; }
	.tmp-ch__name { font-size: 15px; }
	.tmp-ch__grow { display: none; }
	.tmp-ch__pill { height: 38px; padding: 0 12px; font-size: 14px; }
	.tmp-ch__long { display: none; } .tmp-ch__short { display: inline; }
	.tmp-ch .tmp-me__txt, .tmp-ch .tmp-me--out span { display: none; }
	.tmp-ch .tmp-me--in { padding: 0 6px; }
	.tmp-ch .tmp-me--out { width: 42px; padding: 0; justify-content: center; }
	.tmp-ch__bar-in { padding: 0 20px; }
	.tmp-ch__bar a { padding: 11px 12px; font-size: 14px; }
	.tmp-ch__bar a:first-child { margin-left: -12px; }
}
@media (max-width: 560px) { .tmp-ch__pill { display: none; } .tmp-ch__book { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .tmp-me--in::after, .tmp-ch__bagi, .tmp-ch__count, .tmp-ch__bag:hover .tmp-ch__bagi { animation: none !important; } }
