/* groups.css: the one look for native grouping elements (fieldset/legend, details/summary).
   Loaded by every app layout (backend, account, activation, tag runner, sign-in).

   ANTIPATTERN (see DESIGN.md, "UI antipatterns"): a <fieldset> or <details> that falls back to the
   browser default, i.e. a black 1px square border, a legend that cuts through the border, or a bare
   triangle marker. The baselines below use :where() (zero specificity) so every component class still
   wins, but nothing can ever render unstyled. Do not add inline style="" to these elements. */

/* ---- fieldset + legend ---- */
:where(fieldset){min-width:0;margin:0;padding:16px 18px 18px;border:1px solid var(--manage-line,#d9e4e7);border-radius:12px;background:#fff}
:where(fieldset)>:where(legend){padding:0 8px;margin-inline-start:-4px;font-size:14px;font-weight:700;line-height:1.3;color:var(--manage-deep,#102b38)}
:where(fieldset:disabled){opacity:.6}
/* a group that needs a heading but no frame (radio and choice lists) */
fieldset.ui-group-plain{padding:0;border:0;border-radius:0;background:none}
fieldset.ui-group-plain>legend{padding:0 0 8px;margin:0}

/* ---- details + summary ---- */
.ui-details,.manage-accordion,:where(details:not([class])){border:1px solid var(--manage-line,#d9e4e7);border-radius:10px;background:#fff;margin:0 0 10px;overflow:hidden}
.ui-details>summary,.manage-accordion>summary,:where(details:not([class]))>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:12px 16px;cursor:pointer;list-style:none;font-size:14px;font-weight:700;color:var(--manage-deep,#102b38)}
.ui-details>summary::-webkit-details-marker,.manage-accordion>summary::-webkit-details-marker,:where(details:not([class]))>summary::-webkit-details-marker{display:none}
.ui-details>summary::after,.manage-accordion>summary::after,:where(details:not([class]))>summary::after{content:"";flex:none;width:8px;height:8px;margin-top:-4px;border-right:2px solid var(--manage-brand,#006384);border-bottom:2px solid var(--manage-brand,#006384);transform:rotate(45deg);transition:transform .15s ease}
.ui-details[open]>summary::after,.manage-accordion[open]>summary::after,:where(details:not([class]))[open]>summary::after{margin-top:4px;transform:rotate(-135deg)}
.ui-details[open]>summary,.manage-accordion[open]>summary,:where(details:not([class]))[open]>summary{border-bottom:1px solid var(--manage-line,#d9e4e7);background:var(--manage-surface,#f4f7f8)}
.ui-details>summary:hover,.manage-accordion>summary:hover,:where(details:not([class]))>summary:hover{background:var(--manage-surface,#f4f7f8)}
.ui-details>summary:focus-visible,.manage-accordion>summary:focus-visible,:where(details:not([class]))>summary:focus-visible{outline:2px solid var(--manage-brand,#006384);outline-offset:-2px}
.ui-details-gap{margin-top:20px}
/* the body of a disclosure: any direct child except the summary */
.ui-details>:not(summary),:where(details:not([class]))>:not(summary){margin:0;padding:14px 16px 0}
.ui-details>:not(summary):last-child,:where(details:not([class]))>:not(summary):last-child{padding-bottom:16px}
.ui-details>.manage-table-scroll,:where(details:not([class]))>.manage-table-scroll{padding:14px 0 0}

/* action lists: one card per action, opens in place (admin pages) */
.manage-accordion>form,.manage-accordion>.manage-accordion-body{padding:16px;margin:0}
.manage-accordion>form+form{border-top:1px solid var(--manage-line,#d9e4e7)}
.manage-accordion>p,.manage-accordion>.manage-inline-warning,.manage-accordion>.manage-help{margin:16px 16px 0}
.manage-accordion>.manage-inline-warning+form,.manage-accordion>p+form{padding-top:14px}
.manage-accordion-danger>summary{color:#8a2d2d}
.manage-accordion-danger[open]>summary{background:#fbf0ef}

@media(forced-colors:active){:where(fieldset),.ui-details,.manage-accordion,:where(details:not([class])){border-color:CanvasText}}

/* QR codes next to links (13 Nov 2026): scan with a phone to test the mobile experience */
.qr-list{display:flex;flex-wrap:wrap;align-items:flex-start;gap:24px 28px}
.qr-item{display:grid;gap:12px;margin:0;width:184px;max-width:100%;justify-items:center;text-align:center}
.qr-code{box-sizing:border-box;width:168px;max-width:100%;aspect-ratio:1;padding:10px;border:1px solid var(--manage-line,#d9e4e7);border-radius:12px;background:#fff}
.qr-code svg{display:block;width:100%;height:100%}
.qr-item figcaption{display:grid;gap:4px;max-width:28ch;font-size:13px;line-height:1.4;color:var(--manage-deep,#102b38)}
.qr-item figcaption strong{font-weight:700}
.qr-item figcaption span{color:var(--manage-muted,#52636d);font-size:12.5px;line-height:1.5}

/* Icon list: a rounded icon tile, a bold title on its own line and a muted description below it. Use for "ways to ..." panels. */
.icon-list{display:grid;gap:20px;margin:0 0 20px;padding:0;list-style:none}
.icon-list-item{display:grid;grid-template-columns:44px minmax(0,1fr);gap:14px;align-items:start}
.icon-list-tile{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--manage-blue,#eaf4f6);color:var(--manage-brand,#006384)}
.icon-list-tile .manage-icon{width:22px;height:22px}
.icon-list-text{display:grid;gap:3px;min-width:0}
.icon-list-text>strong{display:block;color:var(--manage-deep,#102b38);font-size:15px;line-height:1.35}
.icon-list-text>span{display:block;color:var(--manage-muted,#52636d);font-size:13.5px;line-height:1.55}

/* Wallet setup: the install QR next to the add-to-wallet buttons */
.wallet-setup{display:flex;flex-wrap:wrap;align-items:center;gap:24px 40px;margin:18px 0 20px}
.wallet-setup-buttons{display:grid;justify-items:start;gap:12px}.wallet-setup-buttons>p{margin:0}.wallet-setup-buttons img{display:block;height:auto}
.ui-details>pre.svc-code{margin:14px 16px 16px;padding:12px 14px;border-radius:8px}
