/* ReadSpeaker launcher — a compact icon pinned to the top-right corner that
   reveals the (visually heavy) ReadSpeaker button on hover/focus. The rsbtn is
   kept rendered (opacity, not display:none) so webReader.js still enhances it. */
.readspeaker-launcher {
    position: fixed;
    right: 4px;
    top: 60px;
    z-index: 1200;
}

.readspeaker-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--theme-text-primary);
    background: var(--theme-surface-raised);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: opacity 120ms ease, color 120ms ease;
}

.readspeaker-launcher-icon:hover {
    color: var(--theme-accent, currentColor);
}

/* Viewport-fixed (not absolute) so the narrow 40px launcher box never
   constrains the width (32px) — ReadSpeaker expands the player on interaction and
   would otherwise wrap. Kept a descendant of the launcher so hover still works. */
.readspeaker-launcher .rsbtn {
    position: fixed;
    top: 60px;
    right: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.readspeaker-launcher:hover .readspeaker-launcher-icon,
.readspeaker-launcher:focus-within .readspeaker-launcher-icon {
    opacity: 0;
    pointer-events: none;
}

.readspeaker-launcher:hover .rsbtn,
.readspeaker-launcher:focus-within .rsbtn {
    opacity: 1;
    pointer-events: auto;
}
