/* Guided balance-goal templates */

.bbi-gb-picker .bbi-card__head,
.bbi-gb-form .bbi-card__head,
.bbi-gb-goals .bbi-card__head,
.bbi-gb-board .bbi-card__head { padding: 14px 18px 10px; }

/* Type legend */
.bbi-gb-legend {
  display: flex;
  gap: 12px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-gb-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bbi-gb-legend i { width: 9px; height: 9px; border-radius: 3px; }
.bbi-gb-legend i.bbi-tint-navy { background: linear-gradient(135deg, #344767, #1e2a4a); }

/* Template grid */
.bbi-gb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 18px;
}

.bbi-gb-tpl {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 74px;
  padding: 9px 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--bbi-line);
  background: #fff;
  box-shadow: var(--bbi-shadow-sm);
  transition: transform 0.25s var(--bbi-ease), box-shadow 0.25s ease, border-color 0.25s ease,
    background-color 0.25s ease, opacity 0.35s ease;
}

.bbi-gb-tpl b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bbi-ink);
}

.bbi-gb-tpl.is-hover {
  transform: translateY(-2px);
  border-color: rgba(94, 114, 228, 0.35);
  box-shadow: 0 12px 22px -12px rgba(50, 50, 93, 0.4);
}

.bbi-gb-tpl.is-dim { opacity: 0.74; box-shadow: none; }

.bbi-gb-tpl.is-picked {
  border-color: rgba(94, 114, 228, 0.7);
  background: #f5f6ff;
  box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.16), 0 12px 22px -14px rgba(50, 50, 93, 0.45);
}

.bbi-gb-tpl__check {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bbi-grad-brand);
  color: #fff;
  transform: scale(0);
  transition: transform 0.4s var(--bbi-spring);
}

.bbi-gb-tpl__check svg { width: 11px; height: 11px; }
.bbi-gb-tpl.is-picked .bbi-gb-tpl__check { transform: scale(1); }

/* Settings panel */
.bbi-gb-config { overflow: hidden; }

.bbi-gb-empty {
  position: absolute;
  inset: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
  border: 1.5px dashed #dfe3f1;
  text-align: center;
  transition: opacity 0.3s ease;
}

.bbi-gb-empty.bbi-hide { visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }

.bbi-gb-empty__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--bbi-surface-2);
  color: var(--bbi-faint);
}

.bbi-gb-empty__icon svg { width: 20px; height: 20px; }
.bbi-gb-empty b { font-size: 14px; font-weight: 800; color: var(--bbi-muted); }
.bbi-gb-empty small { max-width: 170px; font-size: 12px; font-weight: 600; line-height: 1.4; color: #a3aec4; }

.bbi-gb-form {
  height: 100%;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.35s ease, transform 0.55s var(--bbi-ease);
}

.bbi-gb-form.is-open { opacity: 1; transform: none; }

.bbi-gb-opts { padding: 0 18px; }

.bbi-gb-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  border-bottom: 1px solid var(--bbi-line);
  font-size: 13px;
  font-weight: 600;
  color: var(--bbi-muted);
}

.bbi-gb-opt b { font-size: 13px; font-weight: 800; color: var(--bbi-ink); }
.bbi-gb-opt .bbi-tag { height: 24px; }

.bbi-gb-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px 0 7px;
  border-radius: 8px;
  background: rgba(94, 114, 228, 0.1);
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-indigo);
}

.bbi-gb-field svg { width: 13px; height: 13px; }

.bbi-gb-dev { display: inline-flex; align-items: center; gap: 4px; }
.bbi-gb-dev i { width: 9px; height: 9px; border-radius: 3px; background: var(--bbi-good); }
.bbi-gb-dev i + i { margin-right: 3px; background: var(--bbi-bad); }

.bbi-gb-add {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  justify-content: center;
  height: 42px;
  font-size: 14px;
}

.bbi-gb-add svg { width: 16px; height: 16px; }
.bbi-gb-add.is-success { background: var(--bbi-grad-good); box-shadow: 0 12px 24px -10px rgba(26, 174, 111, 0.5); }

/* Goals on the node */
.bbi-gb-list { display: grid; gap: 5px; padding: 0 12px; }

.bbi-gb-goal {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 8px;
  border-radius: 11px;
  transition: background-color 0.4s ease;
}

.bbi-gb-goal b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-gb-goal small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }
.bbi-gb-goal .bbi-pill { height: 18px; padding: 0 7px; font-size: 11px; }

.bbi-gb-goal--new {
  background: #f5f6ff;
  box-shadow: inset 0 0 0 1px rgba(94, 114, 228, 0.25);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.55s var(--bbi-spring);
}

.bbi-gb-goal--new.is-in { opacity: 1; transform: none; }

/* Mini BoogieBoard */
.bbi-gb-board .bbi-card__head small { font-weight: 600; }

.bbi-gb-pivot {
  display: grid;
  grid-template-columns: 76px 58px 48px repeat(4, 1fr);
  grid-template-rows: 22px repeat(3, 31px);
  gap: 5px;
  align-items: center;
  padding: 0 18px;
}

.bbi-gb-th {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-gb-th--name { justify-content: flex-start; }
.bbi-gb-th--q { height: 22px; border-radius: 7px; background: rgba(94, 114, 228, 0.1); color: var(--bbi-indigo); }

.bbi-gb-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--bbi-ink);
}

.bbi-gb-name i { width: 10px; height: 10px; border-radius: 3px; }

.bbi-gb-c {
  display: grid;
  place-items: center;
  height: 31px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bbi-surface-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-muted);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.bbi-gb-c--good { background: var(--bbi-good-bg); border-color: var(--bbi-good-edge); color: var(--bbi-good); }
.bbi-gb-c--bad { background: var(--bbi-bad-bg); border-color: var(--bbi-bad-edge); color: var(--bbi-bad); }

.bbi-gb-th--q,
.bbi-gb-c--q {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.45s var(--bbi-spring), background-color 0.4s ease, color 0.4s ease,
    border-color 0.4s ease;
}

.bbi-gb-th--q.is-in,
.bbi-gb-c--q.is-in { opacity: 1; transform: none; }

.bbi-gb-ghost {
  position: absolute;
  top: 77px;
  right: 18px;
  bottom: 18px;
  width: 186px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1.5px dashed #dfe3f1;
  font-size: 12px;
  font-weight: 700;
  color: #a3aec4;
  transition: opacity 0.3s ease;
}
