.driver-popover .driver-popover-title,
.driver-popover .driver-popover-description,
.driver-popover .driver-popover-description p {
    text-align: left;
}

.driver-popover .tour-action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e8e3f1;
    text-align: left;
}
.driver-popover .tour-action-bar a,
.driver-popover .tour-action-bar button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 4px 8px;
    border: 1px solid #e4ddf3;
    border-radius: 8px;
    background: #f7f4fc;
    font-family: inherit;
    cursor: pointer;
    color: #6240d5;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
}
.driver-popover .tour-action-bar a:hover,
.driver-popover .tour-action-bar button:hover {
    color: #3f259a;
    background: #eee7fa;
    border-color: #c9b9eb;
}
.driver-popover .tour-action-bar a:focus-visible,
.driver-popover .tour-action-bar button:focus-visible {
    outline: 2px solid #ac98f8;
    outline-offset: 3px;
}

.tour-video-dialog {
    position: fixed;
    inset: 0;
    width: min(960px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 44px 0 0;
    border: 0;
    border-radius: 12px;
    background: #171225;
    box-shadow: 0 20px 80px #0006;
}
.tour-video-dialog::backdrop { background: rgba(23, 18, 37, 0.35); }
.tour-video-dialog iframe {
    display: block;
    width: 100%;
    height: min(540px, calc((100vw - 32px) * 9 / 16), calc(100dvh - 76px));
    border: 0;
}
.tour-video-close {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}
.tour-video-close:focus-visible { outline: 2px solid #ac98f8; }

/* Driver disables pointer events on every body descendant during a tour.
   The modal is in the top layer, but its controls still match that rule. */
.driver-active .tour-video-dialog,
.driver-active .tour-video-dialog *,
.driver-active .tour-video-dialog::backdrop {
    pointer-events: auto;
}

.driver-popover .tour-action-icon {
    display: block;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.driver-popover.tour-panel-minimized {
    visibility: hidden;
    pointer-events: none;
}
.driver-popover.tour-panel-minimized * {
    pointer-events: none;
}
.tour-resume-button {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 1000000001;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #6a49f2;
    color: #fff;
    box-shadow: 0 4px 18px #32235e40;
    cursor: pointer;
    pointer-events: auto;
}
.tour-resume-button svg { width: 24px; height: 24px; }
.tour-resume-button:focus-visible { outline: 3px solid #ac98f8; outline-offset: 3px; }

/* Keep native pointer-event rules (especially Vuetify overlay containers) intact. */
body.tour-page-unlocked .driver-overlay {
    display: none;
    pointer-events: none;
}
.driver-popover .tour-minimize-button {
    position: absolute;
    top: 0;
    right: 32px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 22px;
    cursor: pointer;
}
.driver-popover .driver-popover-title { padding-right: 40px; }

body.driver-active:not(.tour-page-unlocked) .driver-overlay path,
body.driver-active .driver-popover-close-btn {
    pointer-events: auto;
    cursor: pointer;
}

/* Forms are containers, not clickable cards; keep their surface stable on hover. */
.v-card:has(#window-0) > .v-card__overlay,
#project-create-dialog > .v-card__overlay,
#pageDialog > .v-card__overlay {
    opacity: 0;
}

/* Compatibility for already compiled Razor forms that still carry click listeners. */
.v-card:has(#window-0) > .v-ripple__container,
#project-create-dialog > .v-ripple__container,
#pageDialog > .v-ripple__container {
    display: none;
}
.v-card:has(#window-0),
#project-create-dialog,
#pageDialog {
    cursor: default;
}
