/* v27 M4: Ustawienia sheet (glass per glassmorphism-ui: solid fallback first, tint + blur only where supported,
   content rows on solid surfaces). Uses the page's tokens, so light/dark and no-glass follow automatically. */
.fb-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.fb-gear svg { width: 24px; height: 24px; }
html.fbs-open, html.fbs-open body { overflow: hidden; }
.fbs-overlay { position: fixed; inset: 0; z-index: 1000; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.fbs-overlay[hidden] { display: none; }
.fbs-sheet {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 560px;
  height: calc(100% - max(44px, env(safe-area-inset-top))); border-radius: 28px 28px 0 0;
  background: var(--g-solid); color: var(--label); overflow: hidden;
  animation: fbs-up 380ms var(--spring, ease-out);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .fbs-sheet { background: var(--g-tint-sheet); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
}
html.no-glass .fbs-sheet { background: var(--g-solid) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
@keyframes fbs-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .fbs-sheet { animation: none; } }
.fbs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 12px 6px 20px; }
.fbs-title { margin: 0; font: 700 28px/1.15 var(--font-display); letter-spacing: -0.022em; }
.fbs-done { min-height: 44px; min-width: 44px; padding: 0 12px; border: none; background: transparent; color: var(--blue); font: 600 17px var(--font); cursor: pointer; touch-action: manipulation; }
.fbs-done:focus-visible, .fbs-user:focus-visible, .fbs-add:focus-visible, .fbs-seg-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 12px; }
.fbs-msg { min-height: 20px; padding: 0 20px; font-size: 13px; font-weight: 600; color: var(--label); }
.fbs-msg.is-bad { color: var(--red); }
.fbs-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 16px calc(28px + env(safe-area-inset-bottom)); }
.fbs-head { margin: 14px 0 7px 16px; font: 400 13px var(--font); text-transform: uppercase; letter-spacing: 0.02em; color: var(--label-2-glass, var(--label-2)); }
.fbs-list { margin-bottom: 8px; }
.fbs-foot { margin: 0 16px 18px; font-size: 13px; line-height: 1.35; color: var(--label-2-glass, var(--label-2)) !important; }
.fbs-row { width: 100%; text-align: left; font: inherit; color: var(--label); background: transparent; border: none; }
.fbs-row .switch-sub { color: var(--label-2); }
button.fbs-row { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; padding-right: 16px; }
button.fbs-row:active { background: var(--surface-pressed); }
.fbs-row--stack { flex-wrap: wrap; padding: 10px 12px 12px 16px; }
.fbs-row--stack > .switch-text { flex: 1 1 100%; min-width: 0; }
.fbs-row--stack > .fbs-select { max-width: 100%; width: 100%; margin: 8px 0 0; }
.fbs-label { font-size: 17px; }
.fbs-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbs-blue { color: var(--blue); font-weight: 600; }
.fbs-chev { font-size: 22px; color: var(--label-2); }
.fbs-select {
  max-width: 58%; min-height: 44px; padding: 0 30px 0 12px; margin-right: 10px; border: none; border-radius: 12px; background: var(--fill);
  color: var(--label); font: 400 16px var(--font); -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--label-2) 50%), linear-gradient(135deg, var(--label-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px; background-size: 5px 5px; background-repeat: no-repeat;
}
.fbs-editor .fbs-select { max-width: 100%; width: 100%; margin: 0 0 12px; }
.fbs-seg { display: flex; width: 100%; padding: 2px; border-radius: 12px; background: var(--fill); }
.fbs-seg-btn { flex: 1 1 0; min-height: 40px; border: none; border-radius: 10px; background: transparent; color: var(--label); font: 500 14px var(--font); cursor: pointer; touch-action: manipulation; padding: 0 4px; }
.fbs-seg-btn[aria-checked="true"] { background: var(--surface); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
@media (prefers-color-scheme: dark) { .fbs-seg-btn[aria-checked="true"] { background: #636366; } }
.fbs-editor { padding: 6px 16px 14px; border-top: 0.5px solid var(--separator); }
.fbs-mini { display: block; margin: 8px 0 6px; font-size: 13px; color: var(--label-2) !important; }
.fbs-role-hint { margin: 6px 4px 10px; font-size: 13px; color: var(--label-2); line-height: 1.35; }
.fbs-input { box-sizing: border-box; width: 100%; min-height: 44px; margin-bottom: 4px; padding: 0 12px; border: none; border-radius: 12px; background: var(--fill); color: var(--label); font: 400 17px var(--font); }
.fbs-input--row { margin: 8px 0 2px; }
.fbs-setup .fbs-foot { margin-bottom: 8px; }
.fbs-input:focus-visible, .fbs-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.fbs-confirm { margin: 6px 0 12px; font-size: 15px; line-height: 1.35; color: var(--label) !important; }
.fbs-editor .sheet-secondary-btn, .fbs-editor .sheet-cta-btn { margin: 0 0 8px; }
.fbs-danger { color: var(--red) !important; }
.fbs-editor .sheet-secondary-btn { background: var(--fill); }
.fbs-audit-row { min-height: 52px; }
.fbs-audit-row .fbs-label { font-size: 15px; }
/* v27 M5 S0: invite links (share, copy, QR made on the device), requests to join, active links */
.fbs-editor .fbs-seg { margin-bottom: 4px; }
.fbs-role-hint { margin: 6px 0 12px !important; }
.fbs-qr { display: block; margin: 12px auto; border-radius: 12px; background: #fff; }
.fbs-request .switch-text { flex: 1 1 100%; min-width: 0; }
.fbs-request .switch-text .fbs-label { overflow: hidden; text-overflow: ellipsis; }
.fbs-decide { display: flex; gap: 8px; width: 100%; margin-top: 10px; }
.fbs-decide button { flex: 1 1 0; min-height: 44px; margin: 0; }
.fbs-decide .sheet-secondary-btn { background: var(--fill); }
.fbs-link .switch-text { flex: 1 1 auto; min-width: 0; }
.fbs-link .fbs-label { font-size: 15px; }
.fbs-revoke { flex: 0 0 auto; min-height: 44px; padding: 0 4px 0 12px; border: none; background: transparent; color: var(--red); font: 400 15px var(--font); cursor: pointer; touch-action: manipulation; }
.fbs-revoke:disabled, .fbs-decide button:disabled { opacity: 0.5; }
.fbs-revoke:focus-visible, .fbs-decide button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 10px; }
#fb-settings-btn.has-requests { position: relative; }
#fb-settings-btn.has-requests::after { content: ''; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg, #fff); }
