/* Uses the theme's colours, fonts and .btn classes. */
html.bgi-lock { overflow: hidden; }
.bgi-fab { position: fixed; right: 20px; bottom: 20px; z-index: 55; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--green, #1f7f56); color: #fff; font: 600 0.95rem var(--font-body, sans-serif); cursor: pointer; box-shadow: 0 6px 18px rgba(15, 44, 63, 0.22); }
.bgi-fab:hover { background: var(--green-2, #2aa36f); }
.bgi-fab:focus-visible { outline: 3px solid var(--amber, #e9a23b); outline-offset: 2px; }
@media (max-width: 760px) { .bgi-fab { display: none; } }

.bgi:not(.bgi--inline) { display: none; position: fixed; inset: 0; z-index: 10000; }
.bgi.is-open { display: block; }
.bgi-back { position: absolute; inset: 0; background: rgba(15, 44, 63, 0.45); }
.bgi-panel { position: absolute; right: 20px; bottom: 20px; width: min(430px, calc(100vw - 40px)); max-height: min(720px, calc(100vh - 40px)); display: flex; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 16px 44px rgba(15, 44, 63, 0.3); animation: bgi-in 0.18s ease-out; }
@keyframes bgi-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bgi-panel { animation: none; } }
.bgi form { display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0; color: var(--ink, #142430); font-size: 0.95rem; line-height: 1.45; }
.bgi-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--night, #0f2c3f); color: #fff; }
.bgi-head strong { font-family: var(--font-display, sans-serif); font-size: 1.1rem; }
.bgi-x { border: 0; background: none; color: #fff; font-size: 1.6rem; line-height: 1; padding: 2px 8px; cursor: pointer; }
.bgi-prog { display: flex; gap: 4px; padding: 12px 16px 0; }
.bgi-prog i { flex: 1; height: 4px; border-radius: 2px; background: var(--line, #d8e0e4); }
.bgi-prog i.on { background: var(--green, #1f7f56); }
.bgi-stepk { margin: 6px 16px 0; font: 500 0.72rem var(--font-mono, monospace); color: var(--ink-2, #4a5b67); }
.bgi-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 16px 14px; -webkit-overflow-scrolling: touch; }
.bgi-body h3 { margin: 4px 0 10px; font-family: var(--font-display, sans-serif); font-size: 1.25rem; outline: 0; }
.bgi-body p { margin: 0 0 10px; }
.bgi-f { margin-bottom: 10px; }
.bgi-f label { display: block; margin-bottom: 3px; font-weight: 600; font-size: 0.86rem; }
.bgi-f b { color: #b0392b; }
.bgi-f input, .bgi-f select, .bgi-f textarea { display: block; width: 100%; padding: 9px 10px; border: 1px solid var(--line, #d8e0e4); border-radius: var(--radius, 4px); background: #fff; color: var(--ink, #142430); font: 400 16px var(--font-body, sans-serif); }
.bgi-f input:focus, .bgi-f select:focus, .bgi-f textarea:focus { outline: 2px solid var(--green, #1f7f56); outline-offset: 0; border-color: var(--green, #1f7f56); }
.bgi-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px; }
.bgi-opt { display: block; width: 100%; margin-bottom: 8px; padding: 12px; border: 1px solid var(--line, #d8e0e4); border-radius: var(--radius, 4px); background: #fff; color: var(--ink, #142430); text-align: left; font: inherit; cursor: pointer; }
.bgi-opt b { display: block; }
.bgi-opt small { color: var(--ink-2, #4a5b67); }
.bgi-opt:hover, .bgi-opt.is-on { border-color: var(--green, #1f7f56); box-shadow: inset 0 0 0 1px var(--green, #1f7f56); }
.bgi-chip { display: inline-block; margin: 0 6px 8px 0 !important; padding: 2px 7px; border-radius: 3px; background: #e2f1ea; color: var(--green, #1f7f56); font: 500 0.72rem var(--font-mono, monospace); }
.bgi-sum { margin-bottom: 12px; padding: 10px 12px; border-radius: var(--radius, 4px); background: var(--paper, #f3f6f6); font-size: 0.88rem; overflow-wrap: anywhere; }
.bgi-link { border: 0; padding: 0; background: none; color: var(--green, #1f7f56); font: inherit; text-decoration: underline; cursor: pointer; }
.bgi-help { color: var(--ink-2, #4a5b67); font-size: 0.82rem; }
.bgi-more { margin-bottom: 10px; }
.bgi-more summary { margin-bottom: 8px; color: var(--green, #1f7f56); font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.bgi-hp { position: absolute; left: -9999px; }
.bgi-tsbox, .qf .bgi-ts { margin: 4px 0 10px; min-height: 65px; }
.bgi-err { margin: 0; color: #b0392b; font-size: 0.86rem; }
.bgi-err:empty { display: none; }
.bgi-foot { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line, #d8e0e4); }
.bgi-foot:empty { display: none; }
.bgi-foot .btn { flex: 1; justify-content: center; text-align: center; }
.bgi-foot .btn--primary { flex: 2; }
.bgi-wa { background: #25d366; border-color: #25d366; color: #07321d; }

.bgi--inline { border: 1px solid var(--line, #d8e0e4); border-top: 3px solid var(--green, #1f7f56); border-radius: var(--radius, 4px); background: #fff; }
.bgi--inline .bgi-body { overflow: visible; }

@media (max-width: 760px) {
  .bgi-panel { inset: 0; width: 100%; max-height: none; height: 100%; border-radius: 0; animation: none; padding-bottom: env(safe-area-inset-bottom); }
}
