/* First-run tour (direction E). Scoped under .app-screen--tour. */

/* Cover the whole viewport, including the tab bar, whatever the shell says. */
.app-screen.app-screen--tour {
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    z-index: 3000 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: hidden;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

/* Spotlight: a transparent hole whose huge outer shadow is the dim layer. */
.app-screen--tour .tour-spot {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    box-sizing: border-box;
    border-radius: 14px;
    background: transparent;
    pointer-events: none;
    box-shadow:
        0 0 0 6px rgba(249, 226, 67, .9),
        0 0 0 14px rgba(249, 226, 67, .2),
        0 0 0 9999px rgba(5, 13, 25, .72);
    transition: transform 180ms ease, width 180ms ease, height 180ms ease;   /* placed by transform (tour.js moveTo) */
}

/* centred stop (nothing to point at): just the dim layer, no yellow ring */
.app-screen--tour[data-placement="centre"] .tour-spot {
    box-shadow: 0 0 0 9999px rgba(5, 13, 25, .72);
}

.app-screen--tour .tour-card {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(16px, 16px);   /* tour.js moveTo places it */
    box-sizing: border-box;
    width: calc(100vw - 32px);
    max-width: 400px;
    padding: 16px;
    background: #ffffff;
    color: #0b1526;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
    font-family: var(--font-family);
    transition: transform 180ms ease;
}

.app-screen--tour .tour-pointer {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffffff;
    left: 0;
    transform: rotate(45deg);   /* tour.js adds the translateX that aims it */
    border-radius: 3px;
    pointer-events: none;
    transition: transform 180ms ease;
}

.app-screen--tour .tour-label {
    position: relative;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #006D4F;
}

.app-screen--tour .tour-title {
    position: relative;
    margin: 6px 0 8px;
    font-family: var(--font-family);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0b1526;
    outline: none;
}

.app-screen--tour .tour-text {
    position: relative;
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #2f3b4f;
}

.app-screen--tour .tour-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 0 14px;
    background: #f9e243;
    color: #0b1526;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
}
.app-screen--tour .tour-link[hidden] { display: none; }
.app-screen--tour .tour-link:focus-visible { outline: 3px solid #006D4F; outline-offset: 2px; }

.app-screen--tour .tour-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.app-screen--tour .tour-skip {
    min-height: 44px;
    min-width: 44px;
    padding: 0 8px 0 0;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #2f3b4f;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.app-screen--tour .tour-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-screen--tour .tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c5cad3;
}

.app-screen--tour .tour-dot.is-current {
    background: #006D4F;
}

.app-screen--tour .tour-next {
    min-height: 44px;
    min-width: 88px;
    padding: 0 20px;
    margin: 0;
    background: #006D4F;
    color: #ffffff;
    border: 0;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.app-screen--tour .tour-next:active {
    background: #005a41;
}

/* DONE beside a REGISTER link: outlined like BACK, so the yellow link is the main action */
.app-screen--tour .tour-next.tour-next--quiet {
    background: none;
    color: #006D4F;
    box-shadow: inset 0 0 0 2px #006D4F;
}

.app-screen--tour .tour-next.tour-next--quiet:active {
    background: rgba(0, 109, 79, 0.1);
}

.app-screen--tour .tour-nav {
    display: flex;
    gap: 8px;
}

.app-screen--tour .tour-back {
    min-height: 44px;
    padding: 0 14px;
    margin: 0;
    background: none;
    color: #006D4F;
    border: 2px solid #006D4F;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.app-screen--tour .tour-skip:focus-visible,
.app-screen--tour .tour-back:focus-visible,
.app-screen--tour .tour-next:focus-visible {
    outline: 3px solid #f9e243;
    outline-offset: 2px;
}

/* The first placement jumps straight into position; later moves animate. */
.app-screen--tour.tour-instant .tour-spot,
.app-screen--tour.tour-instant .tour-card,
.app-screen--tour.tour-instant .tour-pointer {
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .app-screen--tour .tour-spot,
    .app-screen--tour .tour-card,
    .app-screen--tour .tour-pointer {
        transition: none;
    }
}
