/* Guided tours (driver.js) in the shell's colours, the ? button in the header, and the Tours & What's New page. */

/* Which copy of this file the browser has (checked by the Playwright tests, PW-R tests). Raise it with every change. */
:root {
    --tours-css-version: "2026-10-21.1";
}

.driver-popover.toc-tour {
    font-family: inherit;
    border-radius: 10px;
    border-top: 4px solid var(--brand-yellow);
    max-width: 340px;
    color: #1f1d4a;
}

.driver-popover.toc-tour .driver-popover-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-navy);
}

.driver-popover.toc-tour .driver-popover-description {
    font-size: 0.92rem;
    line-height: 1.45;
}

.driver-popover.toc-tour .driver-popover-progress-text {
    color: #5b5a7a;
}

.driver-popover.toc-tour .driver-popover-footer button {
    text-shadow: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.85rem;
}

.driver-popover.toc-tour .driver-popover-next-btn {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
}

.driver-popover.toc-tour .driver-popover-next-btn:hover,
.driver-popover.toc-tour .driver-popover-next-btn:focus {
    background: #34318a;
    color: #fff;
}

/* The ? button in the header (shown by tours.js only on pages that have a tour): last in the header, to the right of
   the user's name and Logout (desktop) or the account button (phone). */
.shell-header .shell-tour-help {
    order: 10;
    flex: none;
    margin-left: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.15rem;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.shell-tour-help:hover,
.shell-tour-help:focus-visible {
    background: rgba(var(--brand-yellow-rgb),  0.2);
    outline: none;
}

.shell-tour-help[hidden] {
    display: none;
}


.shell-account__tours {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.shell-account__tours:hover {
    text-decoration: underline;
}

/* Tours & What's New page. */
.tours-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tours-item {
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(var(--brand-navy-rgb),  0.12);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tours-item__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.tours-item__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0;
}

.tours-item__text,
.tours-item__meta {
    margin: 0;
}

.tours-item__meta {
    font-size: 0.85rem;
    color: #5b5a7a;
}

/* White text on navy: the page's link colour (navy) would otherwise win and hide the text until hover. */
#toursPage .tours-item a.tours-item__start,
#toursPage .tours-item a.tours-item__start:link,
#toursPage .tours-item a.tours-item__start:visited {
    align-self: flex-start;
    margin-top: auto;
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    text-decoration: none;
    border-bottom: 1px solid var(--brand-navy);
}

#toursPage .tours-item a.tours-item__start:hover,
#toursPage .tours-item a.tours-item__start:focus-visible {
    background: #34318a;
    border-color: #34318a;
    color: #fff !important;
}

.tours-badge {
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 10px;
    background: #ecebf5;
    color: var(--brand-navy);
    white-space: nowrap;
}

.tours-badge--new {
    background: var(--brand-yellow);
    color: var(--brand-navy);
}

.tours-empty,
.tours-note {
    color: #5b5a7a;
}

/* 2.0.173: while a tour runs the page can't be scrolled by the user (tours.js adds html[data-tour-scroll-lock] and
   blocks the wheel, touch and scrolling keys outside the tour's box). The tour still scrolls each step into view.
   body.cr-drawer-open (the asset drawer, opened by the map tour) otherwise lets the page scroll. */
html[data-tour-scroll-lock],
html[data-tour-scroll-lock] body,
html[data-tour-scroll-lock] body.cr-drawer-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* A long step text can still be read: its box scrolls. */
.driver-popover.toc-tour .driver-popover-description {
    max-height: 50vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
