/* =====================================================================
 * Rushd Onboarding self-contained, offline guided-tour widget.
 * Intro.js-style spotlight + directional arrow + step modal, with a
 * "Do not show this again" opt-out on every step. No external deps,
 * no CDN, no framework works inside any of the Rushd subdomain apps.
 * Reused across Academy / CopperTrust / Consult / Workspace by copying
 * this file + rushd-onboarding.js and wiring the host-app callbacks.
 * ===================================================================== */

.rob-root,
.rob-root * { box-sizing: border-box; }

/* Backdrop with a transparent "hole" cut over the spotlighted element.
 * The hole is produced by a huge box-shadow on .rob-spotlight. */
.rob-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
}

.rob-overlay.rob-modal-mode {
    background: rgba(4, 8, 16, 0.72);
    pointer-events: auto;
    backdrop-filter: blur(2px);
}

.rob-spotlight {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(4, 8, 16, 0.72);
    outline: 2px solid #22d3ee;
    outline-offset: 3px;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    animation: rob-pulse 2.2s ease-in-out infinite;
}

@keyframes rob-pulse {
    0%, 100% { outline-color: rgba(34, 211, 238, 0.9); }
    50%      { outline-color: rgba(99, 102, 241, 0.9); }
}

/* Step tooltip / modal card */
.rob-card {
    position: absolute;
    z-index: 2147483001;
    width: min(380px, calc(100vw - 32px));
    background: linear-gradient(180deg, #141b2c 0%, #10162400 140%), #121826;
    color: #e6edf6;
    border: 1px solid #2b3a55;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    padding: 0;
    pointer-events: auto;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    overflow: hidden;
    animation: rob-card-in 0.22s ease;
}

.rob-card.rob-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes rob-card-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rob-card.rob-centered { animation: rob-modal-in 0.24s ease; }
@keyframes rob-modal-in {
    from { opacity: 0; transform: translate(-50%, -46%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* Media slot (illustrative photo / GIF / inline SVG placeholder) */
.rob-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(420px 160px at 50% -20%, #1c2540 0%, #0c1220 70%);
    border-bottom: 1px solid #2b3a55;
    min-height: 116px;
    padding: 14px;
}
.rob-media img { max-width: 100%; max-height: 150px; border-radius: 8px; display: block; }
.rob-media svg { width: 84px; height: 84px; }

.rob-body { padding: 16px 18px 6px; }
.rob-title { margin: 0 0 6px; font-size: 16px; font-weight: 800; letter-spacing: 0.2px; }
.rob-text { margin: 0; font-size: 13px; line-height: 1.6; color: #b7c4dc; }

.rob-footer {
    padding: 10px 18px 16px;
    border-top: 1px solid #1e2a40;
    margin-top: 12px;
}

.rob-optout {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #cdd8ec;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}
.rob-optout input { width: 16px; height: 16px; accent-color: #6366f1; cursor: pointer; flex: 0 0 auto; }

.rob-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rob-progress { font-size: 11.5px; color: #8a99b3; font-weight: 700; letter-spacing: 0.4px; }
.rob-dots { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: middle; }
.rob-dot { width: 6px; height: 6px; border-radius: 50%; background: #2f3d57; display: inline-block; }
.rob-dot.rob-on { background: #22d3ee; }

.rob-btns { display: flex; gap: 8px; }
.rob-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 800;
    font-size: 12.5px;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.rob-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.rob-btn-primary { background: linear-gradient(135deg, #6366f1, #22d3ee); color: #04121a; }
.rob-btn-ghost { background: transparent; color: #cdd8ec; border: 1px solid #2b3a55; }

.rob-skip {
    background: none;
    border: none;
    color: #8a99b3;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 4px;
    text-decoration: underline;
}
.rob-skip:hover { color: #e6edf6; }

/* Directional arrow pointing from the card toward the target element */
.rob-arrow {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 2147483001;
    pointer-events: none;
}
.rob-arrow.rob-up    { border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 10px solid #141b2c; }
.rob-arrow.rob-down  { border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 10px solid #141b2c; }
.rob-arrow.rob-left  { border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-right: 10px solid #141b2c; }
.rob-arrow.rob-right { border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 10px solid #141b2c; }

/* Permanent Help / replay launcher used in the host nav bar */
.rob-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 0 10px;
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid #2b3a55;
    background: transparent;
    color: #cdd8ec;
    font-weight: 800;
    font-size: 12.5px;
    cursor: pointer;
}
.rob-help-btn:hover { border-color: #6366f1; color: #fff; }

@media (max-width: 560px) {
    .rob-card { width: calc(100vw - 24px); }
}
