.hbfcc {
  --hbfcc-navy: #172e50;
  --hbfcc-blue: #234f7c;
  --hbfcc-coral: #ff6633;
  --hbfcc-ice: #f3f8fc;
  --hbfcc-border: #d4e1ee;
  color: var(--hbfcc-navy);
  font-family: inherit;
  line-height: 1.5;
}

.hbfcc [hidden], .hbfcc[hidden] { display: none !important; }
.hbfcc *, .hbfcc *::before, .hbfcc *::after { box-sizing: border-box; }

.hbfcc__banner {
  position: fixed;
  z-index: 999990;
  inset: auto 16px 16px;
  max-width: 1000px;
  margin-inline: auto;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--hbfcc-border);
  border-left: 5px solid var(--hbfcc-coral);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 48px rgba(23, 46, 80, .22);
}

.hbfcc__banner-copy { flex: 1 1 480px; min-width: 0; }
.hbfcc__eyebrow {
  margin: 0 0 4px;
  color: var(--hbfcc-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.hbfcc h2, .hbfcc h3 { color: var(--hbfcc-navy); line-height: 1.2; }
.hbfcc h2 { margin: 0 0 8px; font-size: 22px; }
.hbfcc h3 { margin: 0 0 4px; font-size: 16px; }
.hbfcc p { margin: 0 0 8px; font-size: 14px; }
.hbfcc__links { display: flex; flex-wrap: wrap; gap: 5px 18px; }
.hbfcc__links a { color: var(--hbfcc-blue); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.hbfcc__links a:hover { color: var(--hbfcc-navy); }
.hbfcc__actions { flex: 0 0 190px; display: grid; gap: 8px; }
.hbfcc__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 2px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.hbfcc__button--primary { background: var(--hbfcc-coral); color: var(--hbfcc-navy); }
.hbfcc__button--primary:hover { background: #f4511d; color: var(--hbfcc-navy); }
.hbfcc__button--secondary { border-color: var(--hbfcc-navy); background: #fff; color: var(--hbfcc-navy); }
.hbfcc__button--secondary:hover { background: var(--hbfcc-ice); }
.hbfcc__button--text { background: transparent; color: var(--hbfcc-blue); text-decoration: underline; }
.hbfcc__button--text:hover { background: var(--hbfcc-ice); }
.hbfcc :focus-visible { outline: 3px solid var(--hbfcc-coral); outline-offset: 3px; }

.hbfcc__overlay { position: fixed; z-index: 999991; inset: 0; background: rgba(10, 27, 47, .62); }
.hbfcc__dialog {
  position: fixed;
  z-index: 999992;
  top: 50%;
  left: 50%;
  width: min(94vw, 650px);
  max-height: min(90vh, 760px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 25px 80px rgba(10, 27, 47, .34);
}
.hbfcc__dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.hbfcc__dialog-head h2 { font-size: 24px; }
.hbfcc__close {
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hbfcc-border);
  border-radius: 6px;
  background: #fff;
  color: var(--hbfcc-navy);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.hbfcc__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  padding: 17px;
  border: 1px solid var(--hbfcc-border);
  border-radius: 8px;
  background: var(--hbfcc-ice);
}
.hbfcc__category p, .hbfcc__category small { margin: 0; color: #405b78; font-size: 13px; line-height: 1.4; }
.hbfcc__category strong { display: block; font-size: 16px; }
.hbfcc__category small { display: block; margin-top: 4px; }
.hbfcc__required { flex: none; font-size: 12px; font-weight: 700; color: var(--hbfcc-blue); }
.hbfcc__category--optional { position: relative; cursor: pointer; background: #fff; }
.hbfcc__category--optional input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hbfcc__switch {
  flex: none;
  width: 48px;
  height: 28px;
  border-radius: 20px;
  background: #9bb0c4;
  position: relative;
  transition: background-color .15s ease;
}
.hbfcc__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.hbfcc__category--optional input:checked + .hbfcc__switch { background: var(--hbfcc-blue); }
.hbfcc__category--optional input:checked + .hbfcc__switch::after { transform: translateX(20px); }
.hbfcc__category--optional input:focus-visible + .hbfcc__switch { outline: 3px solid var(--hbfcc-coral); outline-offset: 3px; }
.hbfcc__dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
body.hbfcc-dialog-open { overflow: hidden; }

@media (max-width: 700px) {
  #hbfcc-root #hbfcc-banner[hidden] { display: none !important; }
  #hbfcc-root #hbfcc-banner {
    top: auto !important;
    right: calc(10px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    left: calc(10px + env(safe-area-inset-left, 0px)) !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 20px) !important;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #hbfcc-root .hbfcc__banner-copy {
    flex: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
  }
  #hbfcc-root .hbfcc__actions {
    flex: none !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: start !important;
    align-items: stretch !important;
    gap: 8px;
  }
  #hbfcc-root .hbfcc__actions .hbfcc__button {
    min-width: 0;
    min-height: 44px;
    white-space: normal;
  }
  #hbfcc-root .hbfcc__actions .hbfcc__button--text { grid-column: 1 / -1; }
  #hbfcc-root .hbfcc__banner .hbfcc__links a { font-size: 14px; }
  #hbfcc-root #hbfcc-dialog {
    width: calc(100vw - 20px);
    height: auto !important;
    min-height: 0 !important;
    padding: 18px;
    max-height: calc(100vh - 20px) !important;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  }
  .hbfcc__dialog-actions .hbfcc__button { flex: 1 1 170px; }
}

@media (max-width: 390px) {
  .hbfcc__category { align-items: flex-start; }
  .hbfcc__required { white-space: normal; text-align: right; }
}

@media (max-height: 500px) and (max-width: 700px) {
  #hbfcc-root #hbfcc-banner { padding: 12px !important; gap: 8px !important; }
  #hbfcc-root .hbfcc__banner-copy p { margin-bottom: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .hbfcc__button, .hbfcc__switch, .hbfcc__switch::after { transition: none; }
}
