/* Feature walkthrough (js/tour.js). Sits above Bootstrap modals (z-index 1055). */

.tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    background-color: rgba(0, 0, 0, 0.55);
}

.tour-backdrop.show {
    display: block;
}

/* highlight box: the huge shadow dims the rest of the page. Clicks pass through,
   so the page stays usable while the tour is open. */
.tour-spot {
    position: fixed;
    z-index: 1090;
    display: none;
    border-radius: 8px;
    outline: 3px solid var(--sec1);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    transition: left .2s, top .2s, width .2s, height .2s;
}

.tour-spot.show {
    display: block;
}

.tour-tip {
    position: fixed;
    z-index: 1091;
    display: none;
    width: min(340px, calc(100vw - 20px));
    padding: 14px 16px 12px;
    background-color: white;
    color: #212529;
    border-radius: 10px;
    border-top: 5px solid var(--pri2);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.tour-tip.show {
    display: block;
}

/* placed but not shown yet, while a menu or modal opens */
.tour-tip.tour-wait {
    visibility: hidden;
}

.tour-tip p {
    margin-bottom: 12px;
}

.tour-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0 28px 6px 0;
    color: var(--pri1);
}

.tour-close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.tour-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.tour-count {
    margin-right: auto;
    color: #6c757d;
    font-size: small;
}

.tour-foot,
.tour-note {
    color: #6c757d;
    font-size: small;
}

.tour-foot {
    margin: 12px 0 0 !important;
}

/* video tour: preview in the topic picker, opens the player in a modal */
.tour-video-thumb {
    padding: 0;
    border: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: black;
}

/* hqdefault.jpg is 4:3 with black bars; crop it to 16:9 */
.tour-video-thumb img {
    object-fit: cover;
}

.tour-video-thumb i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    opacity: 0.85;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tour-video-thumb:hover i,
.tour-video-thumb:focus-visible i {
    opacity: 1;
}

/* as large as fits the window: YouTube picks the video quality from the player size */
.tour-video-dialog {
    max-width: min(1920px, 95vw, calc((100vh - 7rem) * 16 / 9));
}

@media (prefers-reduced-motion: reduce) {
    .tour-spot {
        transition: none;
    }
}

@media print {
    .tour-backdrop,
    .tour-spot,
    .tour-tip {
        display: none !important;
    }
}
