/* ---- Trigger widget ---- */
#bfg-widget {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 8px 10px;
  background: #000;
  border: 1px solid #000;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: #fff;
}

#bfg-widget:hover {
  background: #1a1a1a;
}

#bfg-widget .bfg-widget__badge {
  flex: 0 0 auto;
  color: #ffff00;
  font-family: AvenirLTPro1, inherit;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.1;
  padding: 5px 8px;
  text-align: center;
  white-space: nowrap;
}

#bfg-widget .bfg-widget__text {
  flex: 1 1 auto;
  min-width: 0;
}

#bfg-widget .bfg-widget__title {
  display: block;
  margin: 0;
  font-weight: normal;
  font-size: 14px;
  line-height: 1.3;
  color: #fff;
}

#bfg-widget .bfg-widget__subtitle {
  display: block;
  margin: 2px 0 0;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  color: #fff;
}

#bfg-widget .bfg-widget__chevron {
  flex: 0 0 auto;
  color: #fff;
  display: flex;
  align-items: center;
}

#bfg-widget .bfg-widget__chevron .material-icons {
  color: #fff;
}

/* ---- Mobile: compact badge so the text stays on one line each ---- */
@media (max-width: 767px) {
  #bfg-widget {
    gap: 6px;
    padding: 8px;
  }

  #bfg-widget .bfg-widget__chevron .material-icons {
    font-size: 18px;
  }

  #bfg-widget .bfg-widget__badge {
    font-size: 9px;
    padding: 0;
  }

  #bfg-widget .bfg-widget__title {
    font-size: 13px;
  }

  #bfg-widget .bfg-widget__subtitle {
    font-size: 11px;
  }

  #bfg-modal .bfg-modal__header .bfg-modal__title {
    font-size: clamp(15px, 4.7vw, 22px);
    letter-spacing: 0;
  }
}

/* ---- Overlay ---- */
#bfg-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 2147483000;
}

#bfg-overlay.bfg-is-open {
  display: block;
  animation: bfg-fade .2s ease-out;
}

/* ---- Modal (mobile: bottom sheet) ---- */
#bfg-modal {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483001;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 24px 20px;
  max-height: 85vh;
  overflow-y: auto;
  box-sizing: border-box;
  color: #1a1a1a;
}

#bfg-modal.bfg-is-open {
  display: block;
  animation: bfg-slide-up .25s ease-out;
}

/* ---- Modal (desktop: right-side drawer, matches the site's drawers) ---- */
@media (min-width: 768px) {
  #bfg-overlay {
    background: rgba(0, 0, 0, .34);
  }

  #bfg-modal {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 560px;
    max-width: 100vw;
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 32px;
  }

  #bfg-modal.bfg-is-open {
    animation: bfg-slide-in .3s cubic-bezier(.4, 0, .2, 1);
  }
}

/* ---- Modal content ---- */
#bfg-modal .bfg-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

#bfg-modal .bfg-modal__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-family: lato, sans-serif;
}

#bfg-modal .bfg-modal__title .bfg-hl {
  background: #ffe600;
  padding: 2px 6px;
}

#bfg-modal .bfg-modal__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  padding: 0;
}

#bfg-modal .bfg-modal__close:hover {
  background: #e3e7ea;
}

#bfg-modal .bfg-modal__steps {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.5;
  list-style: decimal;
}

#bfg-modal .bfg-modal__steps li {
  margin-bottom: 8px;
}

#bfg-modal .bfg-modal__example {
  background: #eef6fb;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

#bfg-modal .bfg-modal__note {
  font-size: 13px;
  line-height: 1.5;
  color: #5a5a5a;
  margin: 0 0 20px;
}

#bfg-modal .bfg-modal__cta {
  display: block;
  width: 100%;
  background: #004378;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  padding: 14px 16px;
  box-sizing: border-box;
}

#bfg-modal .bfg-modal__cta:hover {
  background: #00365f;
  color: #fff;
}

/* ---- Animations / scroll lock ---- */
@keyframes bfg-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bfg-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes bfg-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

body.bfg-no-scroll {
  overflow: hidden;
}
