/*
 * Brand Bloc online forms (loaded on the forms page only).
 */

/* ---------- Categories and form cards ---------- */
.bb-site .bb-forms { margin-top: 28px; }
.bb-site .bb-forms__cat { margin: 0 0 44px; scroll-margin-top: 120px; }
.bb-site .bb-forms__cat > h2 { margin: 0 0 6px; }
.bb-site .bb-forms__lead { margin: 0 0 14px; color: var(--bb-muted); }

.bb-site details.bb-form {
  background: var(--bb-white);
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius);
  margin: 14px 0;
  overflow: hidden;
  scroll-margin-top: 120px;
}
.bb-site details.bb-form[open] { box-shadow: var(--bb-shadow); }
.bb-site details.bb-form > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 22px;
}
.bb-site details.bb-form > summary::-webkit-details-marker { display: none; }
.bb-site details.bb-form > summary:focus-visible { outline: 3px solid var(--bb-amber); outline-offset: -3px; }
.bb-site .bb-form__name { display: block; font-weight: 700; font-size: 1.12rem; line-height: 1.3; color: var(--bb-ink); }
.bb-site .bb-form__desc { display: block; margin-top: 3px; font-size: 0.95rem; line-height: 1.45; color: var(--bb-muted); }
.bb-site .bb-form__open {
  flex: none;
  padding: 0.55em 1.25em;
  border-radius: 999px;
  background: var(--bb-amber);
  color: var(--bb-ink);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  white-space: nowrap;
}
.bb-site details.bb-form[open] .bb-form__open { background: var(--bb-ink); color: var(--bb-white); }
.bb-site .bb-form__opened,
.bb-site details.bb-form[open] .bb-form__closed { display: none; }
.bb-site details.bb-form[open] .bb-form__opened { display: inline; }
.bb-site .bb-form__body { border-top: 1px dashed #cfc6ae; padding: 22px 22px 26px; }

/* ---------- The form ---------- */
.bb-site .bb-f [hidden],
.bb-site .bb-form__body [hidden] { display: none !important; }
.bb-site .bb-f__intro p { margin: 0 0 8px; }
.bb-site .bb-f__loading { margin: 0; color: var(--bb-muted); }

.bb-site .bb-f__step {
  border: 0;
  border-top: 3px solid var(--bb-amber);
  margin: 26px 0 0;
  padding: 0;
  min-width: 0;
}
.bb-site .bb-f__step > legend {
  padding: 0 14px 0 0;
  font-family: var(--bb-display);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--bb-ink);
}
.bb-site .bb-f__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 18px;
  padding-top: 16px;
}
.bb-site .bb-f__field { grid-column: span 3; min-width: 0; }
.bb-site .bb-f--w2 { grid-column: span 2; }
.bb-site .bb-f--w4 { grid-column: span 4; }
.bb-site .bb-f--w6,
.bb-site .bb-f__head,
.bb-site .bb-f__note { grid-column: 1 / -1; }

.bb-site .bb-f__label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bb-ink);
}
.bb-site .bb-f__req { color: #b3261e; font-weight: 700; }
.bb-site .bb-f__help { margin: 6px 0 0; font-size: 0.86rem; line-height: 1.45; color: var(--bb-muted); }
.bb-site .bb-f__note { margin: 0; font-size: 0.95rem; color: var(--bb-muted); }
.bb-site .bb-f__head { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--bb-line); }
.bb-site .bb-f__head h4 { margin: 0; font-family: var(--bb-body); font-size: 1rem; font-weight: 700; color: var(--bb-navy); }

.bb-site .bb-f input[type="text"],
.bb-site .bb-f input[type="email"],
.bb-site .bb-f input[type="tel"],
.bb-site .bb-f input[type="date"],
.bb-site .bb-f select,
.bb-site .bb-f textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b9b199;
  border-radius: 9px;
  background: var(--bb-white);
  color: var(--bb-text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: none;
}
.bb-site .bb-f textarea { min-height: 96px; resize: vertical; }
.bb-site .bb-f input:focus-visible,
.bb-site .bb-f select:focus-visible,
.bb-site .bb-f textarea:focus-visible {
  outline: 3px solid var(--bb-amber);
  outline-offset: 1px;
  border-color: var(--bb-navy);
}
.bb-site .bb-f ::placeholder { color: #8a8ea6; opacity: 1; }
.bb-site .bb-f__row { display: flex; gap: 8px; }
.bb-site .bb-f__row > * { flex: 1 1 0; }

.bb-site .bb-f__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-site .bb-f__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #b9b199;
  border-radius: 999px;
  background: var(--bb-white);
  font-size: 0.97rem;
  line-height: 1.3;
  cursor: pointer;
}
.bb-site .bb-f__opt:has(input:checked) { border-color: var(--bb-navy); background: #eef0ff; font-weight: 600; }
.bb-site .bb-f__opt:has(input:focus-visible) { outline: 3px solid var(--bb-amber); outline-offset: 1px; }
.bb-site .bb-f__opt input,
.bb-site .bb-f__check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--bb-navy); }
.bb-site .bb-f__check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.97rem; line-height: 1.45; cursor: pointer; }
.bb-site .bb-f__check input { margin-top: 3px; }

.bb-site .bb-f--err input:not([type="radio"]):not([type="checkbox"]),
.bb-site .bb-f--err select,
.bb-site .bb-f--err textarea,
.bb-site .bb-f--err .bb-f__opt { border-color: #b3261e; }
.bb-site .bb-f--err .bb-f__label,
.bb-site .bb-f--err.bb-f__consent { color: #b3261e; }

.bb-site .bb-f__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bb-site .bb-f__consent {
  margin: 28px 0 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--bb-paper);
  border: 1px solid var(--bb-line);
}
.bb-site .bb-f__warn { margin: 14px 0 0; font-size: 0.88rem; color: var(--bb-muted); }

.bb-site .bb-f__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 20px; }
.bb-site .bb-f__btn {
  min-height: 48px;
  padding: 0.7em 1.5em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.bb-site .bb-f__btn--send { background: var(--bb-amber); color: var(--bb-ink); }
.bb-site .bb-f__btn--send:hover { background: var(--bb-ink); color: var(--bb-white); }
.bb-site .bb-f__btn--alt { background: transparent; border-color: var(--bb-ink); color: var(--bb-ink); }
.bb-site .bb-f__btn--alt:hover { background: var(--bb-ink); color: var(--bb-white); }
.bb-site .bb-f__btn--plain { background: transparent; color: var(--bb-muted); padding-inline: 0.6em; text-decoration: underline; }
.bb-site .bb-f__btn--plain:hover { color: var(--bb-ink); }
.bb-site .bb-f__btn:focus-visible { outline: 3px solid var(--bb-blue); outline-offset: 2px; }
.bb-site .bb-f__btn[disabled] { opacity: 0.55; cursor: progress; }

.bb-site .bb-f__status { margin-top: 12px; min-height: 1.5em; font-weight: 600; color: var(--bb-navy); }
.bb-site .bb-f__status--err { color: #b3261e; }
.bb-site .bb-f__status--ok { color: #17663a; }

.bb-site .bb-f__done {
  padding: 26px 24px;
  border-radius: 12px;
  background: #eaf6ee;
  border: 1px solid #b7dcc4;
}
.bb-site .bb-f__done:focus { outline: none; }
.bb-site .bb-f__done h3 { margin: 0 0 8px; color: #114d2b; }
.bb-site .bb-f__done p { margin: 0 0 8px; }

/* ---------- Search and category shortcuts ---------- */
.bb-site .bb-forms__bar { position: sticky; top: 0; z-index: 5; margin: 0 0 30px; padding: 14px 0 12px; background: var(--bb-paper, #faf7ef); }
.bb-site .bb-forms__q {
  display: block; width: 100%; min-height: 54px; padding: 12px 18px 12px 46px;
  border: 1px solid #b9b199; border-radius: 999px; background: var(--bb-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2310187A' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px 50%;
  font: inherit; font-size: 1.02rem; color: var(--bb-text); box-shadow: 0 4px 18px rgba(10, 14, 63, 0.06);
}
.bb-site .bb-forms__q:focus-visible { outline: 3px solid var(--bb-amber); outline-offset: 1px; border-color: var(--bb-navy); }
.bb-site .bb-forms__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bb-site .bb-forms__chip { padding: 0.4em 0.95em; border-radius: 999px; border: 1px solid var(--bb-line); background: var(--bb-white); color: var(--bb-navy); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.bb-site .bb-forms__chip:hover { border-color: var(--bb-navy); background: #eef0ff; }
.bb-site .bb-forms__none { padding: 22px; border: 1px dashed var(--bb-line); border-radius: var(--bb-radius); color: var(--bb-muted); text-align: center; }
.bb-site .bb-forms__cat[hidden], .bb-site details.bb-form[hidden], .bb-site .bb-forms__none[hidden], .bb-site .bb-forms__chips[hidden] { display: none !important; }

/* ---------- Direct links, logos, uploads and signatures ---------- */
.bb-site .bb-form__text { flex: 1 1 auto; min-width: 0; }
.bb-site .bb-form__logo { flex: none; display: block; width: auto; height: 22px; }
.bb-site .bb-form__link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5em 0.95em;
  border: 1px solid var(--bb-line);
  border-radius: 999px;
  background: var(--bb-white);
  color: var(--bb-navy);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.bb-site .bb-form__link:hover { border-color: var(--bb-navy); color: var(--bb-ink); }
.bb-site .bb-form__link:focus-visible { outline: 3px solid var(--bb-amber); outline-offset: 1px; }
.bb-site .bb-form__link--done { border-color: #17663a; color: #17663a; background: #eaf6ee; }
.bb-site .bb-form__linkicon { font-size: 0.9em; }
.bb-site .bb-f__logo { display: block; width: auto; height: 34px; margin: 0 0 12px; }

.bb-site .bb-f__fileinput {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px dashed #b9b199;
  border-radius: 9px;
  background: var(--bb-paper);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.bb-site .bb-f__fileinput::file-selector-button {
  margin-right: 12px;
  padding: 0.45em 1em;
  border: 0;
  border-radius: 999px;
  background: var(--bb-ink);
  color: var(--bb-white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bb-site .bb-f__fileinput:focus-visible { outline: 3px solid var(--bb-amber); outline-offset: 1px; }
.bb-site .bb-f--err .bb-f__fileinput { border-color: #b3261e; border-style: solid; }
.bb-site .bb-f__fileinfo { margin: 6px 0 0; font-size: 0.86rem; line-height: 1.4; }
.bb-site .bb-f__fileinfo:empty { display: none; }
.bb-site .bb-f__fileinfo--ok { color: #17663a; }
.bb-site .bb-f__fileinfo--err { color: #b3261e; font-weight: 600; }

.bb-site .bb-sig { margin-top: 10px; max-width: 560px; }
.bb-site .bb-sig__box {
  position: relative;
  height: 170px;
  border: 1px solid #b9b199;
  border-radius: 12px;
  background: var(--bb-white);
  overflow: hidden;
}
.bb-site .bb-sig__pad { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.bb-site .bb-sig__line { position: absolute; left: 34px; right: 18px; bottom: 38px; border-bottom: 1.5px solid #b9b199; }
.bb-site .bb-sig__x { position: absolute; left: 14px; bottom: 36px; font-size: 1.15rem; line-height: 1; color: #8a8ea6; }
.bb-site .bb-sig__hint { position: absolute; left: 0; right: 0; top: 44%; text-align: center; color: #a3a7bd; font-size: 0.95rem; pointer-events: none; transition: opacity 0.15s ease; }
.bb-site .bb-sig--on .bb-sig__hint { opacity: 0; }
.bb-site .bb-sig__box:focus-within,
.bb-site .bb-sig__box:hover { border-color: var(--bb-navy); }
.bb-site .bb-sig__bar { display: flex; justify-content: flex-end; margin-top: 6px; }
.bb-site .bb-sig__clear {
  padding: 0.35em 0.4em;
  border: 0;
  background: transparent;
  color: var(--bb-muted);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}
.bb-site .bb-sig__clear:hover { color: var(--bb-ink); }
.bb-site .bb-f--err .bb-sig__box { border-color: #b3261e; border-width: 2px; }

@media (max-width: 781px) {
  .bb-site .bb-f__row { flex-wrap: wrap; }
  .bb-site .bb-f__row > * { flex: 1 1 calc(50% - 4px) !important; }
}
@media (max-width: 599px) {
  .bb-site .bb-sig__box { height: 150px; }
}

/* ---------- Cash flow projection ---------- */
.bb-site .bb-cf { margin-top: 10px; padding: 16px 18px 18px; border: 1px solid var(--bb-line); border-radius: 12px; background: var(--bb-paper); }
.bb-site .bb-cf__startlab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-weight: 600; color: var(--bb-ink); }
.bb-site .bb-cf__startlab select { width: auto; min-width: 200px; }
.bb-site .bb-cf__sec { margin: 18px 0 8px; font-size: 0.95rem; font-weight: 700; color: var(--bb-navy); text-transform: none; letter-spacing: 0; }
.bb-site .bb-cf__rows { display: grid; gap: 8px; }
.bb-site .bb-cf__row { padding: 10px 12px; border-radius: 10px; background: var(--bb-white); border: 1px solid var(--bb-line); }
.bb-site .bb-cf__line { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(150px, 210px) auto auto; align-items: center; gap: 8px 14px; }
.bb-site .bb-cf__fixed { font-weight: 600; color: var(--bb-ink); }
.bb-site .bb-cf .bb-cf__name { min-height: 40px; }
.bb-site .bb-cf__each { display: flex; align-items: center; gap: 8px; }
.bb-site .bb-cf .bb-cf__amt { min-height: 40px; padding: 8px 10px; text-align: right; font-variant-numeric: tabular-nums; }
.bb-site .bb-cf .bb-cf__amt:disabled { background: #f1efe8; color: #9a9db0; }
.bb-site .bb-cf__per { font-size: 0.86rem; color: var(--bb-muted); white-space: nowrap; }
.bb-site .bb-cf__vary { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--bb-muted); cursor: pointer; white-space: nowrap; }
.bb-site .bb-cf__vary input { width: 16px; height: 16px; margin: 0; accent-color: var(--bb-navy); }
.bb-site .bb-cf__rm, .bb-site .bb-cf__add { padding: 0.35em 0.2em; border: 0; background: transparent; color: var(--bb-navy); font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.bb-site .bb-cf__rm { color: var(--bb-muted); font-weight: 400; }
.bb-site .bb-cf__add { margin-top: 6px; }
.bb-site .bb-cf__months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.bb-site .bb-cf__month { display: block; }
.bb-site .bb-cf__mlab { display: block; margin-bottom: 3px; font-size: 0.78rem; font-weight: 600; color: var(--bb-muted); }
.bb-site .bb-cf__sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--bb-line); font-size: 0.93rem; color: var(--bb-ink); font-variant-numeric: tabular-nums; }
.bb-site .bb-cf__neg { color: #b3261e; font-weight: 600; }
.bb-site .bb-f--err .bb-cf { border-color: #b3261e; }
@media (max-width: 781px) {
  .bb-site .bb-cf { padding: 12px; }
  .bb-site .bb-cf__line { grid-template-columns: 1fr 1fr; }
  .bb-site .bb-cf__line > :first-child { grid-column: 1 / -1; }
  .bb-site .bb-cf__months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Cash flow projection ---------- */
.bb-site .bb-cf { margin-top: 10px; padding: 16px 18px 18px; border: 1px solid var(--bb-line); border-radius: 12px; background: var(--bb-paper); }
.bb-site .bb-cf__startlab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-weight: 600; color: var(--bb-ink); }
.bb-site .bb-cf__startlab select { width: auto; min-width: 200px; }
.bb-site .bb-cf__sec { margin: 18px 0 8px; font-size: 0.95rem; font-weight: 700; color: var(--bb-navy); text-transform: none; letter-spacing: 0; }
.bb-site .bb-cf__rows { display: grid; gap: 8px; }
.bb-site .bb-cf__row { padding: 10px 12px; border-radius: 10px; background: var(--bb-white); border: 1px solid var(--bb-line); }
.bb-site .bb-cf__line { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(150px, 210px) auto auto; align-items: center; gap: 8px 14px; }
.bb-site .bb-cf__fixed { font-weight: 600; color: var(--bb-ink); }
.bb-site .bb-cf .bb-cf__name { min-height: 40px; }
.bb-site .bb-cf__each { display: flex; align-items: center; gap: 8px; }
.bb-site .bb-cf .bb-cf__amt { min-height: 40px; padding: 8px 10px; text-align: right; font-variant-numeric: tabular-nums; }
.bb-site .bb-cf .bb-cf__amt:disabled { background: #f1efe8; color: #9a9db0; }
.bb-site .bb-cf__per { font-size: 0.86rem; color: var(--bb-muted); white-space: nowrap; }
.bb-site .bb-cf__vary { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--bb-muted); cursor: pointer; white-space: nowrap; }
.bb-site .bb-cf__vary input { width: 16px; height: 16px; margin: 0; accent-color: var(--bb-navy); }
.bb-site .bb-cf__rm, .bb-site .bb-cf__add { padding: 0.35em 0.2em; border: 0; background: transparent; color: var(--bb-navy); font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.bb-site .bb-cf__rm { color: var(--bb-muted); font-weight: 400; }
.bb-site .bb-cf__add { margin-top: 6px; }
.bb-site .bb-cf__months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.bb-site .bb-cf__month { display: block; }
.bb-site .bb-cf__mlab { display: block; margin-bottom: 3px; font-size: 0.78rem; font-weight: 600; color: var(--bb-muted); }
.bb-site .bb-cf__sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--bb-line); font-size: 0.93rem; color: var(--bb-ink); font-variant-numeric: tabular-nums; }
.bb-site .bb-cf__neg { color: #b3261e; font-weight: 600; }
.bb-site .bb-f--err .bb-cf { border-color: #b3261e; }
@media (max-width: 781px) {
  .bb-site .bb-cf { padding: 12px; }
  .bb-site .bb-cf__line { grid-template-columns: 1fr 1fr; }
  .bb-site .bb-cf__line > :first-child { grid-column: 1 / -1; }
  .bb-site .bb-cf__months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 781px) {
  .bb-site .bb-f__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .bb-site .bb-f__field,
  .bb-site .bb-f--w4 { grid-column: 1 / -1; }
  .bb-site .bb-f--w2 { grid-column: span 1; }
}
@media (max-width: 599px) {
  .bb-site details.bb-form > summary { flex-direction: column; align-items: flex-start; padding: 16px; }
  .bb-site .bb-form__body { padding: 16px 14px 20px; }
  .bb-site .bb-f--w2 { grid-column: 1 / -1; }
  .bb-site .bb-f__btn--send,
  .bb-site .bb-f__btn--alt { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-site .bb-f__btn { transition: none; }
}
