/* ==========================================================================
   Welcome tutorial (home page)

   The page is dimmed by four panels drawn around the highlighted element instead of a single
   full-screen overlay with a box-shadow hole: this way the hole is genuinely transparent and the
   target keeps its own stacking context. Promoting the target with a z-index would break the
   navbar, which sits at z-index 1000 with a backdrop-filter (see base.css).
   ========================================================================== */

.rsk-tut-panel {
    position: fixed;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

.rsk-tut-panel.is-visible {
    opacity: 1;
}

/* Sits on top of the hole so the highlighted element stays visible but not clickable:
   without it the user could navigate away (e.g. hitting "Gioca") in the middle of the tutorial. */
.rsk-tut-blocker {
    position: fixed;
    z-index: 10000;
    background: transparent;
    cursor: default;
}

/* Thin ring around the highlighted area, purely decorative. */
.rsk-tut-ring {
    position: fixed;
    z-index: 10000;
    border: 2px solid #ff6a00;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(255, 106, 0, 0.6);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.rsk-tut-modal {
    position: fixed;
    z-index: 10001;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 12px;
    background: #14181d;
    color: #f2f2f2;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rsk-tut-modal.is-visible {
    opacity: 1;
}

.rsk-tut-modal__progress {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 6px;
}

.rsk-tut-modal__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 10px 0;
}

.rsk-tut-modal__content {
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0;
}

.rsk-tut-modal__note {
    display: block;
    margin-top: 14px;
    font-size: 0.75rem;
    line-height: 1.35;
    opacity: 0.6;
}

.rsk-tut-modal__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.rsk-tut-modal__footer .rsk-tut-btn-next {
    margin-left: auto;
}

.rsk-tut-modal__footer .btn {
    white-space: nowrap;
}

.rsk-tut-btn-skip {
    background: none;
    border: none;
    padding: 0 4px;
    color: inherit;
    opacity: 0.6;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
}

.rsk-tut-btn-skip:hover {
    opacity: 1;
}

/* On small screens the modal is docked at the bottom: there is rarely room to place it beside
   the highlighted element without covering it. */
@media (max-width: 767.98px) {
    .rsk-tut-modal {
        left: 16px !important;
        right: 16px;
        width: auto;
        max-height: 60vh;
    }
}

/* ==========================================================================
   Spotlight: the overlay without the step modal, inviting the user to click the element in the
   hole (the "Come funziona" modal of the home). No blocker here: the hole must be clickable.
   ========================================================================== */

.rsk-tut-root--spotlight .rsk-tut-ring {
    animation: rsk-tut-ring-pulse 1.2s ease-in-out infinite;
}

.rsk-tut-arrow {
    position: fixed;
    z-index: 10001;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #ff6a00;
    filter: drop-shadow(0 0 8px rgba(255, 106, 0, 0.8));
    pointer-events: none;
    animation: rsk-tut-arrow-down 1s ease-in-out infinite;
}

.rsk-tut-arrow--up {
    animation-name: rsk-tut-arrow-up;
}

.rsk-tut-arrow--up span {
    transform: rotate(180deg);
}

@keyframes rsk-tut-arrow-down {
    0%, 100% { transform: translateY(-6px); opacity: 1; }
    50%      { transform: translateY(2px);  opacity: 0.35; }
}

@keyframes rsk-tut-arrow-up {
    0%, 100% { transform: translateY(6px);  opacity: 1; }
    50%      { transform: translateY(-2px); opacity: 0.35; }
}

@keyframes rsk-tut-ring-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 106, 0, 0.6); }
    50%      { box-shadow: 0 0 24px 6px rgba(255, 106, 0, 0.9); }
}

@media (prefers-reduced-motion: reduce) {
    .rsk-tut-arrow,
    .rsk-tut-root--spotlight .rsk-tut-ring {
        animation: none;
    }
}

/* ==========================================================================
   "Come funziona" modal of the home (built by howto.js inside RisikoModal)
   ========================================================================== */

.howto-choices {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.howto-choices .btn {
    width: 100%;
}
