/* 30 Nov 2026: the floating reading button on public pages (resources/views/partials/reading-fab-guest.blade.php).
   A copy of the .rfab rules from dashboard.css, which public pages do not load; asho.css then gives it today's animated friend. */
.rfab { position: fixed; right: 14px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 31; }
body.no-tabbar .rfab { bottom: calc(16px + env(safe-area-inset-bottom)); }
.rfab[hidden] { display: none; }
/* While the button shows, the end of the page keeps room for it, so the last lines (the footer) never sit under it. */
body:has(.rfab:not([hidden])) { padding-bottom: calc(var(--g-bar-space) + 72px); }
body.no-tabbar:has(.rfab:not([hidden])) { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.rfab-btn { position: relative; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--g-grad); color: #fff; cursor: pointer;
  box-shadow: 0 10px 24px rgba(74, 39, 214, .38); }
:root[data-theme="dark"] .rfab-btn { border-color: rgba(255, 255, 255, .35); }
.rfab-btn svg { width: 26px; height: 26px; }
.rfab-btn:focus-visible { outline: 3px solid var(--g-accent); outline-offset: 3px; }
.rfab-btn .rfab-dot { position: absolute; top: 2px; right: 2px; border: 2px solid #fff; }
.rfab-count { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); min-width: 26px; padding: 0 7px; border-radius: 99px; background: #fff; color: var(--g-brand); font-size: 13px; font-weight: 700; line-height: 20px; white-space: nowrap; box-shadow: 0 2px 6px rgba(30, 20, 90, .25); }
.rfab.mine .rfab-count { background: #0a8f5e; color: #fff; }
.rfab-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; animation: rfab-pulse 2.4s ease-in-out infinite; }
@keyframes rfab-pulse { 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); } }
.rfab-shade { position: fixed; inset: 0; z-index: 59; background: rgba(14, 11, 36, .45); }
.rfab-shade[hidden], .rfab-panel[hidden] { display: none; }
.rfab-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; max-height: 72vh; max-height: 72dvh;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border: 1px solid var(--g-panel-line); border-bottom: 0; border-radius: 24px 24px 0 0;
  background: var(--card); color: var(--g-text); box-shadow: 0 -12px 40px rgba(30, 20, 90, .25); animation: rfab-up .2s ease-out; }
.rfab-panel header { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--g-line); }
.rfab-panel h2 { margin: 0; font-size: 19px; }
.rfab-panel h2 svg { width: 22px; height: 22px; margin-right: 6px; vertical-align: -4px; color: var(--g-accent); }
.rfab-panel header span { margin-left: auto; font-size: 15px; color: var(--g-muted); }
.rfab-panel header span b { font-size: 17px; color: var(--g-text); }
.rfab-x { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--g-icon-bg); color: var(--g-accent); cursor: pointer; }
.rfab-xico { width: 20px; height: 20px; }
.rfab-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.rfab-person { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--g-line); }
.rfab-person:first-child { border-top: 0; }
.rfab-face { flex: none; display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: var(--g-icon-bg); color: var(--g-accent); font-weight: 700; }
.rfab-face img { width: 100%; height: 100%; object-fit: cover; }
.rfab-who { flex: 1; min-width: 0; line-height: 1.3; }
.rfab-who b, .rfab-who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfab-who b { font-size: 16px; font-weight: 700; color: var(--g-text); }
.rfab-who small { font-size: 14px; color: var(--g-muted); }
.rfab-who .rfab-course { color: var(--g-accent); font-weight: 700; }
.rfab-min { flex: none; font-size: 14px; font-weight: 700; color: var(--g-accent); }
.rfab-quiet { margin: 10px 0 2px; font-size: 15px; color: var(--g-muted); }
.rfab-panel .rfab-go { margin-top: 12px; }
@keyframes rfab-up { from { transform: translateY(24px); opacity: 0; } }

@media (min-width: 768px) {
  .rfab { right: 24px; bottom: 24px; }
  body:has(.rfab:not([hidden])) { padding-bottom: 96px; }
  .rfab-shade { display: none !important; }
  .rfab-panel { left: auto; right: 24px; bottom: 96px; width: 360px; max-height: min(520px, 70vh); border: 1px solid var(--g-panel-line); border-radius: var(--g-r-tile); padding-bottom: 16px; box-shadow: 0 20px 50px rgba(30, 20, 90, .25); }
}
.rfab-guest p { margin: 12px 0 4px; font-size: 15.5px; line-height: 1.55; color: var(--g-muted); }
.rfab-guest ul { margin: 8px 0 4px; padding-left: 20px; font-size: 15px; line-height: 1.6; }
.rfab-guest .rfab-list { flex: none; }
