/* Bank Guarantee Application, October 2026 (option A): fields on the left, the guarantee wording on the right with
   the required-clause checklist, field checks and vetting status. Colours come from the theme variables. */

.bg-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.bg-toolbar .bg-state { font-size: 13px; color: var(--text-secondary, #5B6470); }
.bg-grow { flex: 1; }
.bg-link { border: 0 !important; background: none !important; box-shadow: none !important; color: var(--primary) !important; font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 2px !important; }
.bg-link:hover { text-decoration: underline; }

.bg-workspace { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.bg-fields { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bg-card { background: #fff; border: 1px solid var(--line, #E3E6EA); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bg-card-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-primary, #1A1A1A); }
.bg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.bg-grid2 .bg-span2 { grid-column: 1 / -1; }
.bg-workspace .form-group { margin: 0; }
.bg-workspace .form-group label { font-size: 12px; margin-bottom: 4px; }
.bg-workspace .form-group input, .bg-workspace .form-group select, .bg-workspace .form-group textarea { padding: 9px 11px; font-size: 13.5px; }
.bg-hint { margin: 0; font-size: 12px; color: var(--text-secondary, #5B6470); }
.bg-field-msg { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: #B42318; }
.bg-field-msg:empty { display: none; }
.form-group input.bg-invalid { border-color: #D92D20 !important; }
.bg-more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); list-style: none; }
.bg-more > summary::-webkit-details-marker { display: none; }
.bg-more > summary::before { content: "+ "; }
.bg-more[open] > summary::before { content: "− "; }
.bg-more[open] > .bg-grid2, .bg-more[open] > .form-group { margin-top: 10px; }

.bg-wording { position: sticky; top: 16px; min-width: 0; }
.bg-wording-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bg-wording-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; align-items: start; }
.bg-wording .editor-container { margin: 0; }
.bg-wording #guaranteeTermsEditor { min-height: 0; height: 560px; border-radius: 0 0 8px 8px; }
.bg-wording .ql-editor { font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif; font-size: 14px; line-height: 1.7; padding: 18px 22px; }
.bg-wording .ql-editor h2 { font-size: 15px; letter-spacing: .04em; }
.bg-side { display: flex; flex-direction: column; gap: 12px; }
.bg-side-block { border: 1px solid var(--line, #E3E6EA); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #FAFBFC; }
.bg-side-block h3 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-secondary, #5B6470); }
.bg-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-primary, #1A1A1A); line-height: 1.4; }
.bg-row > span:nth-child(2) { flex: 1; min-width: 0; }
.bg-dot { width: 16px; height: 16px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; margin-top: 1px; }
.bg-dot.is-ok { background: #12784A; } .bg-dot.is-warn { background: #B54708; } .bg-dot.is-error { background: #C4320A; } .bg-dot.is-info { background: var(--primary); } .bg-dot.is-off { background: #CDD3DA; }
.bg-add { border: 0 !important; background: none !important; box-shadow: none !important; color: var(--primary) !important; font-weight: 600; font-size: 12px; cursor: pointer; padding: 0 !important; height: auto !important; min-height: 0 !important; }
.bg-add:hover { text-decoration: underline; }
.bg-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #F2F4F7; color: #5B6470; }
.bg-pill:empty { display: none; }
.bg-pill.is-ok { background: #E5F5EC; color: #12784A; } .bg-pill.is-warn { background: #FEF3E2; color: #B54708; } .bg-pill.is-error { background: #FDEDE8; color: #C4320A; }
.bg-score { font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.bg-muted { color: var(--text-secondary, #5B6470); font-size: 12px; }

.bg-footer { position: sticky; bottom: 0; z-index: 5; grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 18px; margin-top: 4px; background: #fff; border: 1px solid var(--line, #E3E6EA); border-radius: 12px; box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
.bg-footer .btn { padding: 9px 16px; }
.bg-footer-note { font-size: 12.5px; color: var(--text-secondary, #5B6470); }

@media (max-width: 1180px) {
  .bg-workspace { grid-template-columns: 1fr; }
  .bg-wording { position: static; }
}
@media (max-width: 760px) {
  .bg-wording-body { grid-template-columns: 1fr; }
  .bg-grid2 { grid-template-columns: 1fr; }
}

/* The wording gets the full width of its pane; the clause checklist, checks and vetting sit in a row below it. */
.bg-wording-body { grid-template-columns: minmax(0, 1fr); }
.bg-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.bg-wording #guaranteeTermsEditor { height: 460px; }
.bg-wording .ql-editor p { margin: 0 0 .7em; }
.bg-wording { position: static; }
