/* HPG Branch Finder. Colours and fonts come from the Elementor global colours/typography (fallbacks in brackets). */
.hpg-bf{
	--bf-navy:var(--e-global-color-primary,#001458);
	--bf-blue:var(--e-global-color-secondary,#2d8dfe);
	--bf-yellow:var(--e-global-color-accent,#ffe500);
	--bf-yellow-hover:var(--e-global-color-hpgc006,#fff06e);
	--bf-navy-65:var(--e-global-color-hpgc004,rgba(0,20,88,.65));
	--bf-navy-60:var(--e-global-color-741e04db,rgba(0,20,88,.6));
	--bf-navy-9:var(--e-global-color-cbc922ed,rgba(0,20,88,.09));
	--bf-navy-5:var(--e-global-color-0af78038,rgba(0,20,88,.05));
	--bf-red:var(--e-global-color-hpgc017,#d92d20);
	--bf-font:var(--e-global-typography-text-font-family,"Lexend Deca"),sans-serif;
	font-family:var(--bf-font);
	color:var(--bf-navy);
}
.hpg-bf *,.hpg-bf *::before,.hpg-bf *::after{box-sizing:border-box}

/* Reset theme button/input styles (WoodMart sizes and uppercases them). */
.hpg-bf button,.hpg-bf input{font-family:var(--bf-font);letter-spacing:normal;text-transform:none;box-shadow:none;margin:0;min-height:0;-webkit-appearance:none;appearance:none}

/* Bar: tabs + search */
.hpg-bf__bar{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.hpg-bf__tabs{display:flex;flex-wrap:wrap;gap:15px}
.hpg-bf .hpg-bf__tab{box-sizing:border-box;height:50px;min-width:73px;padding:0 28px;border:2px solid var(--bf-navy-9);border-radius:1000px;background:#fff;color:var(--bf-navy);font-size:16px;font-weight:500;line-height:20px;cursor:pointer;transition:border-color .2s,background-color .2s,color .2s}
/* The site's button style (Site Settings > Buttons) paints every button yellow on hover/focus: keep the tabs, cards and reset button in their own colours. */
.hpg-bf .hpg-bf__tab:is(:hover,:focus,:active){background:#fff;color:var(--bf-navy);border:2px solid var(--bf-navy)}
.hpg-bf .hpg-bf__tab.is-active,.hpg-bf .hpg-bf__tab.is-active:is(:hover,:focus,:active){background:var(--bf-navy);border:2px solid var(--bf-navy);color:#fff}
.hpg-bf .hpg-bf__tab:focus-visible,.hpg-bf .hpg-bf__toggle:focus-visible,.hpg-bf .hpg-bf__btn:focus-visible,.hpg-bf .hpg-bf__reset:focus-visible{outline:2px solid var(--bf-blue);outline-offset:2px}

.hpg-bf__search{position:relative;display:block;width:387px;max-width:100%;margin:0}
.hpg-bf .hpg-bf__search input{box-sizing:border-box;display:block;width:100%;height:50px;padding:0 66px 0 35px;border:2px solid var(--bf-navy-9);border-radius:1000px;background:#fff;color:var(--bf-navy);font-size:16px;font-weight:400;line-height:20px;outline:0;transition:border-color .2s}
.hpg-bf .hpg-bf__search input::placeholder{color:var(--bf-navy-60);opacity:1}
.hpg-bf .hpg-bf__search input:focus{border-color:var(--bf-blue)}
.hpg-bf .hpg-bf__search input::-webkit-search-cancel-button{-webkit-appearance:none;display:none}
.hpg-bf__search svg{position:absolute;right:35px;top:50%;transform:translateY(-50%);color:var(--bf-navy-60);pointer-events:none}

/* Body: list + map */
.hpg-bf__body{display:flex;gap:6px;margin-top:35px;height:793px}
.hpg-bf__list{flex:none;width:401px;height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:6px;display:flex;flex-direction:column;gap:10px}
@supports not selector(::-webkit-scrollbar){.hpg-bf__list{scrollbar-width:thin;scrollbar-color:#cbcbcb transparent}}
.hpg-bf__list::-webkit-scrollbar{width:8px}
.hpg-bf__list::-webkit-scrollbar-track{background:transparent}
.hpg-bf__list::-webkit-scrollbar-thumb{background:#cbcbcb;border-radius:8px}
.hpg-bf__map{position:relative;flex:1 1 auto;min-width:0;height:100%;border-radius:20px;overflow:hidden;background:#F7F1DC;z-index:0}
.hpg-bf__map.is-unavailable::after{content:"The map couldn't load. Use Get Directions on a branch.";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;text-align:center;color:var(--bf-navy-65);font-size:16px}

/* Anything the script hides (branch cards that don't match the tab or search, the open card's details, the 'No branches match' message) stays hidden. The theme sets article{display:block}, which overrode the browser's own [hidden] rule, so the list didn't filter (found in peer review, 18 Nov). */
.hpg-bf [hidden]{display:none!important}

/* Branch card */
.hpg-bf__item{flex:none;border:1px solid var(--bf-navy-5);border-radius:20px;background:#fff;transition:background-color .25s,border-color .25s}
.hpg-bf__item:hover{border-color:rgba(45,141,254,.4)}
/* Card head (1.2.3): the branch name is an H3 for search engines, with the toggle button inside it (an H3 can't sit inside a button). The button's ::after stretches over the whole head, so the province, name and address area stays one click target as before. */
.hpg-bf__head{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:24px}
.hpg-bf .hpg-bf__title{margin:0;padding:0;font:inherit;line-height:inherit;color:inherit;text-transform:none;letter-spacing:normal}
.hpg-bf .hpg-bf__toggle,.hpg-bf .hpg-bf__toggle:is(:hover,:focus,:active){position:static;display:inline;width:auto;height:auto;min-height:0;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:inherit;font:inherit;text-align:left;text-transform:none;letter-spacing:normal;cursor:pointer}
.hpg-bf .hpg-bf__toggle::after{content:"";position:absolute;inset:0;border-radius:20px}
.hpg-bf .hpg-bf__toggle:focus-visible{outline:0}
.hpg-bf .hpg-bf__toggle:focus-visible::after{outline:2px solid var(--bf-blue);outline-offset:2px}
.hpg-bf__province{font-size:16px;font-weight:500;line-height:20px;text-transform:uppercase;color:var(--bf-blue)}
.hpg-bf__name{font-size:18px;font-weight:600;line-height:30px;color:var(--bf-navy)}
.hpg-bf__address{font-size:16px;font-weight:400;line-height:24px;color:var(--bf-navy-65)}

.hpg-bf__item.is-open,.hpg-bf__item.is-open:hover{background:var(--bf-navy);border-color:var(--bf-navy)}
.hpg-bf .hpg-bf__item.is-open .hpg-bf__head{padding-bottom:0}
.hpg-bf__item.is-open .hpg-bf__province{color:rgba(255,255,255,.73)}
.hpg-bf__item.is-open .hpg-bf__name{color:#fff}
.hpg-bf__item.is-open .hpg-bf__address{color:rgba(255,255,255,.65)}

.hpg-bf__details{padding:20px 24px 24px}
.hpg-bf__details[hidden]{display:none}
.hpg-bf__details::before{content:"";display:block;height:2px;margin-bottom:18px;background:rgba(255,255,255,.05)}
.hpg-bf img.hpg-bf__logo{display:block;width:auto;max-width:200px;height:40px;object-fit:contain;border-radius:6px;margin-bottom:20px}
.hpg-bf__contact{display:flex;flex-direction:column;font-size:16px;line-height:24px}
.hpg-bf__person{font-weight:500;color:#fff;margin-bottom:5px}
.hpg-bf .hpg-bf__contact a{color:var(--bf-yellow);text-decoration:none;word-break:break-word}
.hpg-bf .hpg-bf__contact a:hover{text-decoration:underline}
.hpg-bf__mobile{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 10px}
.hpg-bf .hpg-bf__contact a.hpg-bf__wa{color:rgba(255,255,255,.75);font-size:14px}
.hpg-bf .hpg-bf__btn{display:inline-flex;align-items:center;justify-content:center;height:50px;margin-top:10px;padding:0 35px;border-radius:1000px;background:var(--bf-yellow);color:var(--bf-navy);font-size:16px;font-weight:500;line-height:20px;text-decoration:none;transition:background-color .2s}
.hpg-bf .hpg-bf__btn:hover{background:var(--bf-yellow-hover);color:var(--bf-navy)}
.hpg-bf__note{display:inline-flex;align-items:center;height:36px;margin-top:14px;padding:0 18px;border-radius:1000px;background:var(--bf-red);color:#fff;font-size:14px;font-weight:600;line-height:18px}

/* No results */
.hpg-bf__empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:36px 24px;border:1px dashed #c9dcf5;border-radius:20px;text-align:center;font-size:16px;line-height:24px}
.hpg-bf__empty[hidden]{display:none}
.hpg-bf__empty span{color:var(--bf-navy-65)}
.hpg-bf .hpg-bf__reset,.hpg-bf .hpg-bf__reset:focus{height:50px;padding:0 35px;border:0;border-radius:1000px;background:var(--bf-navy);color:#fff;font-size:16px;font-weight:500;cursor:pointer}
.hpg-bf .hpg-bf__reset:hover{background:var(--e-global-color-hpgc005,#304178);color:#fff}

/* Map controls and popup (MapLibre) */
.hpg-bf__map .maplibregl-ctrl-group{border-radius:12px;overflow:hidden;box-shadow:0 2px 10px rgba(0,20,88,.15)}
.hpg-bf__map .maplibregl-ctrl-group button{width:36px;height:36px;padding:0;background-color:#fff;border-radius:0}
.hpg-bf__map .maplibregl-ctrl-group button:is(:hover,:focus){background-color:#f2f6ff}
.hpg-bf__map .maplibregl-ctrl-attrib,.hpg-bf__map .maplibregl-ctrl-attrib a{font-family:var(--bf-font);font-size:11px;font-weight:400;color:var(--bf-navy-65)}
.hpg-bf__map .maplibregl-cooperative-gesture-screen{font-family:var(--bf-font);font-size:18px;background:rgba(0,20,88,.55)}
.hpg-bf-pop .maplibregl-popup-content{padding:16px 36px 16px 18px;border-radius:14px;box-shadow:0 6px 24px rgba(0,20,88,.18);font-family:var(--bf-font);color:var(--bf-navy)}
.hpg-bf-pop .maplibregl-popup-close-button{position:absolute;top:4px;right:4px;width:30px;height:30px;min-width:0;padding:0;border:0;font-size:20px;line-height:30px;color:var(--bf-navy);background:transparent;border-radius:8px}
.hpg-bf-pop .maplibregl-popup-close-button:is(:hover,:focus){background:transparent;color:var(--bf-blue)}
.hpg-bf-pop__name{display:block;font-size:16px;font-weight:600;line-height:22px}
.hpg-bf-pop__addr{display:block;margin-top:4px;font-size:14px;line-height:20px;color:var(--bf-navy-65)}
.hpg-bf-pop a.hpg-bf-pop__link{display:inline-block;margin-top:10px;font-size:14px;font-weight:500;color:var(--bf-blue);text-decoration:none}
.hpg-bf-pop a.hpg-bf-pop__link:hover{text-decoration:underline}

/* Tablet: map on top, full list below */
@media (max-width:1024px){
	.hpg-bf__search{flex:1 1 280px;width:auto}
	.hpg-bf__body{flex-direction:column;height:auto;gap:20px;margin-top:30px}
	.hpg-bf__map{order:-1;flex:none;height:460px}
	.hpg-bf__list{width:100%;height:auto;overflow:visible;scrollbar-gutter:auto;padding-right:0}
}
@media (max-width:767px){
	.hpg-bf__tabs{gap:10px}
	.hpg-bf .hpg-bf__tab{height:44px;min-width:0;padding:0 20px}
	.hpg-bf__search{width:100%}
	.hpg-bf__map{height:340px}
	.hpg-bf__head{padding:20px}
	.hpg-bf__details{padding:20px 20px 20px}
}
@media (prefers-reduced-motion:reduce){
	.hpg-bf *{transition:none!important}
}
