/* Admin test console. */
.bmf-test__panel{padding:22px 24px;margin:0 0 22px;border:1px solid #eadfe5;border-radius:16px;background:#fff}
.bmf-test__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.bmf-test__head h2{margin:0;font-size:19px;color:#382a35}
.bmf-test__muted,.bmf-test__hint{color:#7c6573;font-size:13px}
.bmf-test__hint{margin-top:16px}
.bmf-test__selectors{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:14px}
.bmf-test__selectors label,.bmf-test__reset>label:not(.bmf-test__check){display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:#5e4858}
.bmf-test__panel input:not([type=checkbox]),.bmf-test__panel select{width:100%;min-height:43px;padding:10px 12px;border:1px solid #dfcdda;border-radius:10px;background:#fff;color:#382a35;font:inherit;box-sizing:border-box;color-scheme:light}
.bmf-test__panel button{min-height:43px;padding:10px 16px;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer}
.bmf-test__primary{border:1px solid #ac4f7c;background:#ac4f7c;color:white}
.bmf-test__secondary{border:1px solid #dec4d2;background:#fff8fb;color:#a34b73}
.bmf-test__panel button:disabled{opacity:.5;cursor:not-allowed}
.bmf-test__connections{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}
.bmf-test__connections form{border:1px solid #efdfeb;border-radius:12px;padding:16px;display:grid;gap:10px}
.bmf-test__connect-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bmf-test__status{border-radius:20px;background:#f7eef2;color:#8b6277;padding:5px 11px;font-size:12px;font-weight:700}
.bmf-test__status.is-ready{background:#e9f7ef;color:#247a51}
.bmf-test__actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.bmf-test__actions form{border:1px solid #efdfeb;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px}
.bmf-test__actions button{width:100%;margin-top:auto}
.bmf-test__booking-choice{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#75566a}
.bmf-test__booking-choice select{font-size:12px}
.bmf-test__scroll{overflow:auto;width:100%}
.bmf-test__table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}
.bmf-test__table th{background:#fff6fa;color:#6a4258;font-weight:700;white-space:nowrap}
.bmf-test__table th,.bmf-test__table td{padding:12px 10px;border-bottom:1px solid #f0e3ea;vertical-align:top}
.bmf-test__table td:last-child{overflow-wrap:anywhere}
.bmf-test__result{display:inline-block;border-radius:20px;padding:3px 9px;font-size:11px;font-weight:800;background:#f4edf2;color:#745b6c}
.bmf-test__result.is-ok{background:#e9f7ef;color:#277a52}
.bmf-test__result.is-fail{background:#fdecee;color:#b43f50}
.bmf-test__danger{border-color:#f0cdd3}
.bmf-test__danger p{font-size:13px;color:#785865;line-height:1.55}
.bmf-test__reset{max-width:580px;display:grid;gap:14px}
.bmf-test__check{display:flex;align-items:center;gap:10px;font-size:13px;color:#593e4c}
.bmf-test__check input{width:17px;height:17px;accent-color:#ac4f7c}
.bmf-test__danger-button{border:1px solid #b73e58;background:#b73e58;color:#fff;justify-self:start}
.bmf-test__refresh{color:#a34b73;font-size:13px;font-weight:700}
.bmf-test__error{color:#b23851}
@media(max-width:850px){.bmf-test__selectors{grid-template-columns:1fr 1fr}.bmf-test__selectors>button{grid-column:1/-1}.bmf-test__actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.bmf-test__panel{padding:16px}.bmf-test__selectors,.bmf-test__connections,.bmf-test__actions{grid-template-columns:1fr}}
html[data-bmf-dark-active="true"] .bmf-test__panel,
html[data-bmf-dark-active="true"] .bmf-test__connections form,
html[data-bmf-dark-active="true"] .bmf-test__actions form{background:var(--bmf-surface,#262732);border-color:var(--bmf-border,#444453);color:var(--bmf-text,#f6f1f6)}
html[data-bmf-dark-active="true"] .bmf-test__head h2,html[data-bmf-dark-active="true"] .bmf-test__selectors label,
html[data-bmf-dark-active="true"] .bmf-test__reset>label,html[data-bmf-dark-active="true"] .bmf-test__check{color:var(--bmf-text,#f6f1f6)}
html[data-bmf-dark-active="true"] .bmf-test__muted,html[data-bmf-dark-active="true"] .bmf-test__hint,
html[data-bmf-dark-active="true"] .bmf-test__danger p{color:var(--bmf-muted,#b9b1bf)}
html[data-bmf-dark-active="true"] .bmf-test__panel input:not([type=checkbox]),
html[data-bmf-dark-active="true"] .bmf-test__panel select{background:var(--bmf-surface-2,#30313c);border-color:var(--bmf-border,#444453);color:var(--bmf-text,#f6f1f6);color-scheme:dark}
html[data-bmf-dark-active="true"] .bmf-test__secondary{background:var(--bmf-surface-2,#30313c);border-color:var(--bmf-border,#444453);color:#f2a7c7}
html[data-bmf-dark-active="true"] .bmf-test__table th{background:var(--bmf-surface-2,#30313c);color:#f2a7c7}
html[data-bmf-dark-active="true"] .bmf-test__table td{border-color:var(--bmf-border,#444453)}

/* Collapsible test account settings. */
.bmf-test__account-panel{padding:0;overflow:hidden}
.bmf-test__account-summary{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:20px 24px;cursor:pointer;list-style:none}
.bmf-test__account-summary::-webkit-details-marker{display:none}
.bmf-test__account-summary::after{content:"⌄";font-size:21px;line-height:1;color:#a34b73;margin-left:auto;transition:transform .16s ease}
.bmf-test__accounts[open]>.bmf-test__account-summary::after{transform:rotate(180deg)}
.bmf-test__account-title{font-size:19px;font-weight:700;color:#382a35}
.bmf-test__account-names{font-size:13px;color:#7c6573}
.bmf-test__account-status{font-size:12px;color:#8b6277;background:#f7eef2;border-radius:20px;padding:5px 10px;font-weight:700}
.bmf-test__account-content{border-top:1px solid #eadfe5;padding:20px 24px 24px}
.bmf-test__connection{border:1px solid #efdfeb;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.bmf-test__connection form{border:0;padding:0;border-radius:0;display:flex;flex-direction:column;gap:10px}
.bmf-test__connection label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:#5e4858}
.bmf-test__connection-ready{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.bmf-test__reconnect{padding-top:7px;border-top:1px solid #eadfe5}
.bmf-test__reconnect summary{cursor:pointer;font-size:13px;color:#a34b73;font-weight:700;padding:6px 0}
.bmf-test__reconnect form{padding-top:10px}
html[data-bmf-dark-active="true"] .bmf-test__account-title,
html[data-bmf-dark-active="true"] .bmf-test__connection label{color:var(--bmf-text,#f6f1f6)}
html[data-bmf-dark-active="true"] .bmf-test__account-names{color:var(--bmf-muted,#b9b1bf)}
html[data-bmf-dark-active="true"] .bmf-test__account-status{background:var(--bmf-surface-2,#30313c);color:#f2a7c7}
html[data-bmf-dark-active="true"] .bmf-test__account-content,
html[data-bmf-dark-active="true"] .bmf-test__reconnect{border-color:var(--bmf-border,#444453)}
html[data-bmf-dark-active="true"] .bmf-test__connection{background:var(--bmf-surface,#262732);border-color:var(--bmf-border,#444453)}
@media(max-width:620px){.bmf-test__account-summary{padding:16px}.bmf-test__account-content{padding:16px}.bmf-test__account-status{order:3}}

.bmf-test__connections .bmf-test__connection form{background:transparent;border:0;padding:0}
html[data-bmf-dark-active="true"] .bmf-test__connections .bmf-test__connection form{background:transparent;border:0}

/* Real Patient/Doctor test previews. */
.bmf-test__role .bmf-disclosure__summary{padding:19px 23px}
.bmf-test__role-intro{font-size:13px;color:#7c6573;margin-bottom:15px}
.bmf-test__role .bmf-test__connection{max-width:620px}
.bmf-test__role .bmf-test__connection label{max-width:420px}
.bmf-test__role .bmf-test__connection form{border:0;padding:0;background:transparent}
.bmf-test__role-tests{margin-top:22px}
.bmf-test__role .bmf-test__head h3{margin:0;font-size:16px;color:var(--bmf-ink)}
.bmf-test__role .bmf-test__actions .bmf-button{width:100%;margin-top:auto}
.bmf-test__role .bmf-test__actions form{border:1px solid #efdfeb;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px}
.bmf-test__role .bmf-test__actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.bmf-test__preview{margin-top:24px;padding-top:18px;border-top:1px solid #eadfe5}
.bmf-test__preview .bmf-test__head{margin-bottom:4px}
.bmf-test__preview p{margin:4px 0 15px}
.bmf-test__preview-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:13px}
.bmf-test__iframe{display:block;width:100%;min-height:650px;border:1px solid #eadfe5;border-radius:12px;background:#fff}
.bmf-test__iframe[hidden]{display:none}
.bmf-test__role .bmf-test__connection form button{align-self:flex-start}
html[data-bmf-dark-active="true"] .bmf-test__role-intro{color:var(--bmf-muted,#b9b1bf)}
html[data-bmf-dark-active="true"] .bmf-test__role .bmf-test__actions form,html[data-bmf-dark-active="true"] .bmf-test__role .bmf-test__connection{background:var(--bmf-surface,#262732);border-color:var(--bmf-border,#444453)}
html[data-bmf-dark-active="true"] .bmf-test__preview{border-color:var(--bmf-border,#444453)}
@media(max-width:850px){.bmf-test__role .bmf-test__actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.bmf-test__role .bmf-test__actions{grid-template-columns:1fr}.bmf-test__iframe{min-height:540px}}
.bmf-test__role .bmf-test__connection input{width:100%;min-height:43px;padding:10px 12px;border:1px solid #dfcdda;border-radius:10px;background:#fff;color:#382a35;color-scheme:light}
.bmf-test__role .bmf-test__connection form{max-width:430px}
.bmf-test__role .bmf-test__connection-ready form{max-width:none}
html[data-bmf-dark-active="true"] .bmf-test__role .bmf-test__connection input{background:var(--bmf-surface-2,#30313c);border-color:var(--bmf-border,#444453);color:var(--bmf-text,#f6f1f6);color-scheme:dark}

/* Account controls in the test-panel heading. */
.bmf-test__role-shell{position:relative}
.bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{padding-right:310px;min-height:67px;box-sizing:border-box;position:relative}
.bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__label{flex:0 0 auto}
.bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__chevron{position:absolute;right:21px;top:24px}
.bmf-test__role-name{font-size:13px;color:var(--bmf-muted,#7c6573);font-weight:600;max-width:190px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
.bmf-test__role-header-actions{position:absolute;top:12px;right:54px;z-index:4;display:flex;align-items:center;min-height:42px}
.bmf-test__connection-inline{display:flex;align-items:center;gap:10px;min-width:0}
.bmf-test__connection-inline form{margin:0}
.bmf-test__connection-inline .bmf-button{min-height:35px}
.bmf-test__connection-popover{position:relative}
.bmf-test__connection-popover>summary{list-style:none;cursor:pointer;white-space:nowrap;font-size:12px;font-weight:700;color:var(--bmf-rose,#a34b73);padding:8px 2px}
.bmf-test__connection-popover>summary::-webkit-details-marker{display:none}
.bmf-test__connection-popover>summary:focus-visible{outline:2px solid var(--bmf-rose,#a34b73);outline-offset:3px;border-radius:4px}
.bmf-test__connection-popover-content{position:absolute;right:0;top:calc(100% + 8px);z-index:8;width:min(300px,calc(100vw - 64px));padding:16px;border:1px solid var(--bmf-border,#eadfe5);border-radius:12px;background:var(--bmf-white,#fff);box-shadow:0 12px 32px rgba(0,0,0,.18)}
.bmf-test__connection-popover-content form{display:flex;flex-direction:column;gap:10px}
.bmf-test__connection-popover-content label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:var(--bmf-ink,#382a35)}
.bmf-test__connection-popover-content input{width:100%;min-height:42px;padding:10px 12px;box-sizing:border-box;border:1px solid var(--bmf-border,#dfcdda);border-radius:10px;background:var(--bmf-white,#fff);color:var(--bmf-ink,#382a35)}
.bmf-test__connection-popover-content .bmf-button{align-self:flex-start}
.bmf-test__connection-select{font-size:12px;color:var(--bmf-muted,#7c6573)}
html[data-bmf-dark-active="true"] .bmf-test__connection-popover-content{background:var(--bmf-surface,#262732);border-color:var(--bmf-border,#444453)}
html[data-bmf-dark-active="true"] .bmf-test__connection-popover-content label{color:var(--bmf-text,#f6f1f6)}
html[data-bmf-dark-active="true"] .bmf-test__connection-popover-content input{background:var(--bmf-surface-2,#30313c);color:var(--bmf-text,#f6f1f6);border-color:var(--bmf-border,#444453);color-scheme:dark}
@media(max-width:920px){
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-content:start;gap:8px;min-height:144px;padding:14px 45px 74px 16px}
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__label{grid-column:1/3;grid-row:1}
  .bmf-test__role-shell .bmf-test__role-name{grid-column:1;grid-row:2;max-width:100%}
  .bmf-test__role-shell .bmf-disclosure__summary>.bmf-badge{grid-column:2;grid-row:2}
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__chevron{right:17px;top:17px}
  .bmf-test__role-header-actions{top:94px;left:16px;right:16px}
  .bmf-test__connection-inline{gap:12px}
}
@media(max-width:420px){
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{padding-right:36px}
  .bmf-test__role-name{font-size:12px}
  .bmf-test__connection-inline{gap:8px}
  .bmf-test__connection-popover>summary{font-size:11px}
}

/* Functional test / real preview switch, kept outside the disclosure summary. */
.bmf-test__role-shell:has(.bmf-test__role-mode input[value="functions"]:checked) .bmf-test__preview{display:none}
.bmf-test__role-shell:has(.bmf-test__role-mode input[value="preview"]:checked) .bmf-test__functions{display:none}
.bmf-test__role .bmf-test__preview{margin:0;padding:0;border:0}
.bmf-test__role .bmf-test__functions{min-height:70px}
.bmf-test__role-mode{position:absolute;z-index:3;top:13px;left:50%;transform:translateX(-50%);display:flex;align-items:center;min-height:39px}
.bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{padding-right:255px}
.bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__label{flex:0 0 auto}
.bmf-test__role-shell .bmf-test__role-name{max-width:130px}
.bmf-test__preview-actions{gap:8px;margin:0 0 12px}
.bmf-test__preview-actions form{margin:0}
.bmf-test__preview-actions .bmf-icon-button{min-width:38px;min-height:38px}
@media(min-width:1101px){
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{padding-right:225px;gap:9px}
  .bmf-test__role-shell .bmf-test__role-name{max-width:110px}
}
@media(min-width:921px) and (max-width:1100px){
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{display:flex;min-height:108px;padding:14px 54px 57px 16px}
  .bmf-test__role-mode{top:66px;left:18px;transform:none}
  .bmf-test__role-header-actions{top:61px}
}
@media(max-width:920px){
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{min-height:157px;padding-bottom:83px}
  .bmf-test__role-mode{top:106px;left:16px;transform:none}
  .bmf-test__role-header-actions{top:105px;left:auto;right:54px}
}
@media(max-width:650px){
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary{min-height:210px;padding-bottom:127px}
  .bmf-test__role-mode{top:104px;left:16px;transform:none}
  .bmf-test__role-header-actions{top:154px;left:16px;right:16px}
  .bmf-test__role-shell .bmf-test__role-name{max-width:calc(100% - 110px)}
  .bmf-test__role-shell>.bmf-disclosure .bmf-disclosure__summary>.bmf-badge{justify-self:end}
}
