/* APUSA Chapter Finder. Everything is scoped under .apcf so theme and Elementor styles don't collide. */
.apcf{
  --apb-banner-blue:#1D3E8F; --apb-banner-blue-dark:#16337A; --apb-banner-gold:#F5B324;
  --apcf-bg:#FFFFFF; --apcf-surface:#F4F6FB; --apcf-card:#FFFFFF; --apcf-fg:#14232E; --apcf-muted:#4A5A66; --apcf-line:#DCE3EE;
  --apcf-land:#E3E8F2; --apcf-land-hover:#C9D3E8; --apcf-land-on:#1D3E8F; --apcf-land-on-hover:#2A4FA6; --apcf-border:#FFFFFF;
  --apcf-tint:#ECF0F9; --apcf-gold-tint:#FFF5DE; --apcf-gold-ink:#8A5800; --apcf-you:#E0457B;
  --apcf-font-body:'Exo 2',system-ui,sans-serif; --apcf-font-display:'Playfair Display',Georgia,'Times New Roman',serif;
  background:var(--apcf-bg); color:var(--apcf-fg); font-family:var(--apcf-font-body); font-size:16px; line-height:1.5;
  container-type:inline-size; /* layout follows the width the finder is given, not the window */
}
.apcf *,.apcf *::before,.apcf *::after{box-sizing:border-box}
.apcf a{color:inherit}
.apcf button,.apcf input{font:inherit;letter-spacing:normal;text-transform:none}
.apcf :focus-visible{outline:3px solid var(--apb-banner-gold);outline-offset:2px}
.apcf [hidden]{display:none!important}
.apcf-wrap{max-width:1200px;margin:0 auto}

/* Banner */
.apcf-banner{background:var(--apb-banner-blue);color:#fff;padding:40px 16px 48px}
.apcf-hero{display:flex;flex-wrap:wrap;gap:28px 48px;align-items:center}
.apcf-hero-text{flex:1 1 380px;min-width:0;display:flex;flex-direction:column;gap:14px}
.apcf .apcf-h1{margin:0;font-family:var(--apcf-font-display);font-size:clamp(36px,5.2vw,60px);font-weight:700;line-height:1.1;color:#fff;text-wrap:balance;letter-spacing:normal;text-transform:none}
.apcf .apcf-h1 em{font-style:italic;color:var(--apb-banner-gold)}
.apcf .apcf-lede{margin:0;color:#DDE4F4;max-width:52ch;font-size:17px}
.apcf-hero-photo{flex:1 1 440px;min-width:0;margin:0;aspect-ratio:16/9;max-width:100%;border-radius:22px;overflow:hidden;background:var(--apb-banner-blue-dark);box-shadow:0 0 0 6px rgba(255,255,255,.08)}
.apcf-hero-photo img{width:100%;height:100%;object-fit:cover;object-position:58% 50%;display:block;max-width:none}

/* Layout */
.apcf-main{padding:32px 16px 56px}
.apcf-grid{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.apcf-mapcard{flex:999 1 620px;min-width:0;background:var(--apcf-surface);border-radius:22px;padding:20px;position:relative}
.apcf-panel{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:14px}
.apcf-inner{display:flex;flex-direction:column;gap:14px}
.apcf-box{background:var(--apcf-card);border:1px solid var(--apcf-line);border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:12px}
.apcf-scroll{overflow:auto;display:flex;flex-direction:column;gap:10px;padding-right:4px}
@container (min-width:960px){
  .apcf-grid{align-items:stretch}
  .apcf-panel{position:relative;align-self:stretch}
  .apcf-panel>.apcf-inner{position:absolute;inset:0}
  .apcf-grow{flex:1;min-height:0}
  .apcf-scroll{flex:1;min-height:0}
}
@container (max-width:959px){.apcf-scroll{max-height:420px}}

/* Search bar */
.apcf-searchbar{flex-direction:row;flex-wrap:wrap;gap:16px 24px;align-items:flex-end;margin-bottom:24px}
.apcf-search{display:flex;gap:8px;flex-wrap:wrap;flex:0 1 520px;margin:0}
.apcf-search label{flex:1 1 180px;display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600;margin:0}
.apcf .apcf-search input{min-height:48px;padding:0 14px;border:1.5px solid var(--apcf-line);border-radius:12px;background:var(--apcf-card);color:var(--apcf-fg);font-size:16px;width:100%;box-shadow:none}
.apcf-search .apcf-btn{align-self:flex-end;min-height:48px}
.apcf .apcf-status{flex:1 1 100%;margin:0;font-size:14px;color:var(--apcf-muted);min-height:21px}
.apcf .apcf-status.is-warn{color:var(--apcf-gold-ink);font-weight:600}

/* Buttons */
.apcf .apcf-btn{min-height:44px;padding:0 18px;border-radius:999px;border:0;outline:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;font-size:15px;line-height:1.2;text-decoration:none;cursor:pointer;box-shadow:none}
.apcf .apcf-primary{background:var(--apb-banner-blue);color:#fff}
.apcf .apcf-primary:hover{background:var(--apb-banner-blue-dark);color:#fff}
.apcf .apcf-gold{background:var(--apb-banner-gold);color:var(--apcf-fg);font-weight:700;border:0!important}
.apcf .apcf-ghost{background:transparent;border:1.5px solid currentColor!important;color:var(--apcf-fg)}
.apcf .apcf-chip{min-height:40px;padding:0 14px;border-radius:999px;border:1.5px solid var(--apcf-line);background:var(--apcf-card);color:var(--apcf-fg);cursor:pointer;font-size:14px;font-weight:600}

/* Map */
.apcf-map{width:100%;height:auto;display:block}
.apcf-st{fill:var(--apcf-land);stroke:var(--apcf-border);stroke-width:1;cursor:pointer;transition:fill .15s}
.apcf-st:hover{fill:var(--apcf-land-hover)}
.apcf-st.has{fill:var(--apcf-land-on)} .apcf-st.has:hover{fill:var(--apcf-land-on-hover)}
.apcf-st.sel{fill:var(--apb-banner-gold)!important}
.apcf-st:focus{outline:none} .apcf-st:focus-visible{stroke:var(--apb-banner-gold);stroke-width:3}
.apcf-borders{fill:none;stroke:var(--apcf-border);stroke-width:1;pointer-events:none}
.apcf-pin{cursor:pointer}
.apcf-pin .dot{fill:var(--apb-banner-gold);stroke:var(--apb-banner-blue-dark);stroke-width:2}
.apcf-pin.near .dot{fill:#fff;stroke:var(--apb-banner-gold);stroke-width:4}
.apcf-pin.focus .dot{fill:#fff;stroke:var(--apb-banner-blue);stroke-width:4}
.apcf-pin .ring{fill:none;stroke:var(--apb-banner-gold);stroke-width:2;opacity:0;transform-box:fill-box;transform-origin:center}
.apcf-pin.near .ring{opacity:.9;animation:apcf-pulse 1.8s ease-out infinite}
.apcf-you circle{fill:var(--apcf-you);stroke:#fff;stroke-width:3}
.apcf-you .halo{opacity:.2;stroke:none;animation:apcf-pulse 1.8s ease-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes apcf-pulse{from{transform:scale(1);opacity:.6}to{transform:scale(2.4);opacity:0}}
@media (prefers-reduced-motion:reduce){.apcf-pin.near .ring,.apcf-you .halo{animation:none}}
.apcf-legend{display:flex;flex-wrap:wrap;gap:16px;font-size:13px;color:var(--apcf-muted);margin-top:10px}
.apcf-legend span{display:flex;align-items:center;gap:8px}
.apcf-sw{width:14px;height:14px;border-radius:50%;display:inline-block}
.apcf-sw-you{background:var(--apcf-you)}
.apcf-sw-chapter{background:var(--apb-banner-gold)}
.apcf-sw-near{background:#fff;border:3px solid var(--apb-banner-gold)}
.apcf-sw-sel{background:#fff;border:3px solid var(--apb-banner-blue)}
.apcf-tip{position:absolute;pointer-events:none;background:var(--apcf-fg);color:#fff;font-size:13px;font-weight:600;padding:6px 10px;border-radius:8px;white-space:nowrap;transform:translate(-50%,-130%);z-index:2}

/* Results */
.apcf-label{font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--apcf-muted)}
.apcf-note{font-size:13px;color:var(--apcf-muted)}
.apcf-ch{background:var(--apcf-tint);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:8px}
.apcf-ch.near{background:var(--apcf-gold-tint);outline:2px solid var(--apb-banner-gold)}
.apcf .apcf-ch h3{margin:0;font-family:var(--apcf-font-body);font-size:19px;font-weight:700;line-height:1.3;color:var(--apcf-fg)}
.apcf-meta{font-size:14px;color:var(--apcf-muted)}
.apcf-meta strong{color:var(--apcf-fg)}
.apcf-meta a{color:var(--apb-banner-blue);font-weight:600}
.apcf-tag{font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--apcf-gold-ink)}
.apcf-btns{display:flex;gap:8px;flex-wrap:wrap}
.apcf-empty{background:var(--apcf-gold-tint);border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:10px}
.apcf-empty span{color:var(--apcf-muted);font-size:15px}
.apcf-date{display:block;margin-top:2px;font-weight:600;color:var(--apcf-fg)}
