/* Floating help toggle + coach-mark overlay. See helpOverlay.js. */

#help-overlay-btn {
    position: fixed;
    box-sizing: border-box;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    background: var(--mimoja-blue);
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    border: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#help-overlay-btn[aria-pressed="true"] {
    background: var(--text-primary);
}

/* Webview: keep the home fullscreen-toggle slot open but invisible so the help
   button can occupy it without the header collapsing (Sleep sliding over).
   The !important beats ui.js's inline display:none (set because the host OS
   owns fullscreen in a webview). */
.help-webview #main-page #fullscreen-toggle-btn {
    display: flex !important;
    visibility: hidden !important;
}

/* App webview: mirror #fullscreen-toggle-btn — bordered blue box, top-right. */
#help-overlay-btn.help-btn--webview {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    bottom: auto;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: transparent;
    color: var(--mimoja-blue);
    border: 1px solid var(--mimoja-blue);
    box-shadow: none;
    font-size: 30px;
}
#help-overlay-btn.help-btn--webview[aria-pressed="true"] {
    background: var(--mimoja-blue);
    color: #fff;
}

#help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9000;
    cursor: pointer;
}

.help-ring {
    position: fixed;
    border: 3px solid var(--mimoja-blue);
    border-radius: 12px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 0 14px var(--mimoja-blue);
    pointer-events: none;
    animation: help-pulse 1.6s ease-in-out infinite;
}

@keyframes help-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.help-label {
    position: fixed;
    box-sizing: border-box;
    max-width: 260px;
    background: var(--box-color, #fff);
    color: var(--text-primary, #111);
    border: 1px solid var(--mimoja-blue);
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    font-family: 'Inter', system-ui, sans-serif;
}
.help-label strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--mimoja-blue);
    margin-bottom: 2px;
}
.help-label span {
    display: block;
    font-size: 15px;
    line-height: 1.3;
}

.help-hint {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-family: 'Inter', system-ui, sans-serif;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 9999px;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .help-ring { animation: none; }
}
