/* Dashboard tour (dashboard-tour.js): the Driver.js popover in the dashboard's look, light and
   dark, and the "Take the tour" button next to Full screen. Plain CSS on purpose - the compiled
   Tailwind build would not pick up new utility classes without a rebuild. */

/* The popover is appended to <body>, outside .fa-workspace, so the --workspace-* tokens do not
   reach it; the values below match research-dashboard.css. */
.driver-popover.fa-tour-popover {
    font-family: inherit;
    min-width: 260px;
    max-width: 340px;
    padding: 16px 18px 14px;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    background-color: #fff;
    color: #3f3f46;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.fa-tour-popover .driver-popover-title { padding-right: 24px; font-size: 15px; font-weight: 700; line-height: 1.4; color: #27272a; }
.fa-tour-popover .driver-popover-description { font-size: 13px; line-height: 1.55; color: #52525b; }
.fa-tour-popover .driver-popover-description strong { font-weight: 600; color: #27272a; }
.fa-tour-popover .driver-popover-close-btn { color: #a1a1aa; }
.fa-tour-popover .driver-popover-close-btn:hover,
.fa-tour-popover .driver-popover-close-btn:focus-visible { color: #27272a; }
.fa-tour-popover .driver-popover-footer { gap: 12px; margin-top: 14px; }
.fa-tour-popover .driver-popover-progress-text { font-size: 12px; color: #71717a; }
.fa-tour-popover .driver-popover-navigation-btns button + button { margin-left: 6px; }
.fa-tour-popover .driver-popover-footer-btn {
    padding: 6px 12px;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    background-color: #fff;
    color: #3f3f46;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: none;
}
.fa-tour-popover .driver-popover-footer-btn:hover { background-color: #f5f7fa; }
.fa-tour-popover .driver-popover-next-btn { border-color: #2563eb; background-color: #2563eb; color: #fff; }
.fa-tour-popover .driver-popover-next-btn:hover { border-color: #1d4ed8; background-color: #1d4ed8; }
.fa-tour-popover .driver-popover-footer-btn:focus-visible,
.fa-tour-popover .driver-popover-close-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

@media (max-width: 639px) {
    .driver-popover.fa-tour-popover { min-width: 0; max-width: calc(100vw - 32px); }
}

/* Dark mode (class strategy, .dark on <html>). Each arrow side colours only its visible edge. */
.dark .driver-popover.fa-tour-popover { border-color: #334155; background-color: #1e293b; color: #e2e8f0; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.dark .fa-tour-popover .driver-popover-title,
.dark .fa-tour-popover .driver-popover-description strong { color: #f1f5f9; }
.dark .fa-tour-popover .driver-popover-description { color: #cbd5e1; }
.dark .fa-tour-popover .driver-popover-progress-text { color: #94a3b8; }
.dark .fa-tour-popover .driver-popover-close-btn { color: #64748b; }
.dark .fa-tour-popover .driver-popover-close-btn:hover,
.dark .fa-tour-popover .driver-popover-close-btn:focus-visible { color: #f1f5f9; }
.dark .fa-tour-popover .driver-popover-footer-btn { border-color: #334155; background-color: #0f172a; color: #e2e8f0; }
.dark .fa-tour-popover .driver-popover-footer-btn:hover { background-color: #19263a; }
.dark .fa-tour-popover .driver-popover-next-btn { border-color: #2563eb; background-color: #2563eb; color: #fff; }
.dark .fa-tour-popover .driver-popover-next-btn:hover { border-color: #3b82f6; background-color: #3b82f6; }
.dark .fa-tour-popover .driver-popover-arrow-side-left { border-left-color: #1e293b; }
.dark .fa-tour-popover .driver-popover-arrow-side-right { border-right-color: #1e293b; }
.dark .fa-tour-popover .driver-popover-arrow-side-top { border-top-color: #1e293b; }
.dark .fa-tour-popover .driver-popover-arrow-side-bottom { border-bottom-color: #1e293b; }

/* Dialog steps (the Intro's first step): the delete confirmation's look (Components/
   ConfirmDeleteDialog.cshtml) - grey header with the title and a round close button, body,
   grey footer with the buttons on the right. The values are its Tailwind classes. */
.driver-popover.fa-tour-popover.fa-tour-dialog {
    width: 448px;
    min-width: 0;
    max-width: calc(100vw - 32px);
    padding: 0;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    /* Short screens (a phone on its side): never taller than the viewport. Driver.js sets
       display:block inline, so no flex column: the dialog scrolls, header and footer stay put. */
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.fa-tour-dialog .driver-popover-title {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 56px 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 6px 6px 0 0;
    background-color: #f3f4f6;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.025em;
    color: #3f3f46;
}
/* Driver.js sets display:block inline on the close button, so the icon is centred by the
   padding (p-2 around the 16px icon), not by flex. dressDialog() moves the button into the
   header (position: relative in driver.css): centred there like the popup's items-center. */
.fa-tour-dialog .driver-popover-close-btn {
    top: 50%;
    right: 12px;
    margin-top: -16px;
    width: 16px;
    height: 16px;
    padding: 8px;
    line-height: 0;
    border-radius: 9999px;
    color: #3f3f46;
    transition: background-color 0.15s, color 0.15s;
}
.fa-tour-dialog .driver-popover-close-btn svg { display: block; width: 16px; height: 16px; }
.fa-tour-dialog .driver-popover-close-btn:hover,
.fa-tour-dialog .driver-popover-close-btn:focus-visible { background-color: #e2e8f0; color: #dc2626; }
.driver-popover.fa-tour-dialog .driver-popover-title + .driver-popover-description {
    margin: 0;
    min-height: 120px;
    box-sizing: border-box;
    /* p-4 on the body plus the message's pt-2, on the body so single-line copy (no <p>) gets it too. */
    padding: 24px 16px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #52525b;
}
.fa-tour-dialog .driver-popover-description p { margin: 0; }
.fa-tour-dialog .driver-popover-description p + p { margin-top: 10px; }
.fa-tour-callout { margin-top: 12px; padding: 12px 16px; border: 1px solid #bfdbfe; border-radius: 8px; background-color: #eff6ff; color: #1d4ed8; font-size: 13px; }
.fa-tour-dialog .fa-tour-callout p,
.fa-tour-dialog .fa-tour-callout strong { color: #1e40af; }
.fa-tour-callout ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.fa-tour-callout li + li { margin-top: 2px; }
.fa-tour-dialog .fa-tour-callout ul + p { margin-top: 8px; }
/* What the user's plan already includes (Growth, Alpha): emerald instead of the upsell blue. */
.fa-tour-callout.fa-tour-callout-included { border-color: #a7f3d0; background-color: #ecfdf5; color: #047857; }
.fa-tour-dialog .fa-tour-callout-included p,
.fa-tour-dialog .fa-tour-callout-included strong { color: #065f46; }
.fa-tour-dialog .driver-popover-footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 6px 6px;
    background-color: #f9fafb;
}
.fa-tour-dialog .driver-popover-navigation-btns { display: inline-flex; gap: 12px; }
.fa-tour-dialog .driver-popover-navigation-btns button + button { margin-left: 0; }
.fa-tour-dialog .driver-popover-footer-btn { padding: 6px 14px; border-color: #e2e8f0; color: #52525b; font-size: 14px; font-weight: 700; line-height: 20px; }
.fa-tour-dialog .driver-popover-footer-btn:hover { background-color: #f8fafc; }
.fa-tour-dialog .driver-popover-next-btn { border-color: #2563eb; background-color: #2563eb; color: #fff; }
.fa-tour-dialog .driver-popover-next-btn:hover { border-color: #1d4ed8; background-color: #1d4ed8; }

.dark .driver-popover.fa-tour-popover.fa-tour-dialog { background-color: #1e293b; }
.dark .fa-tour-dialog .driver-popover-title { border-bottom-color: #334155; background-color: #1e293b; color: #f4f4f5; }
.dark .fa-tour-dialog .driver-popover-close-btn { color: #f4f4f5; }
.dark .fa-tour-dialog .driver-popover-close-btn:hover,
.dark .fa-tour-dialog .driver-popover-close-btn:focus-visible { background-color: #334155; color: #f87171; }
.dark .driver-popover.fa-tour-dialog .driver-popover-title + .driver-popover-description { background-color: #334155; color: #f4f4f5; }
.dark .fa-tour-callout { border-color: rgba(59, 130, 246, 0.3); background-color: rgba(59, 130, 246, 0.1); color: #93c5fd; }
.dark .fa-tour-dialog .fa-tour-callout p,
.dark .fa-tour-dialog .fa-tour-callout strong { color: #93c5fd; }
.dark .fa-tour-callout.fa-tour-callout-included { border-color: rgba(16, 185, 129, 0.3); background-color: rgba(16, 185, 129, 0.1); color: #6ee7b7; }
.dark .fa-tour-dialog .fa-tour-callout-included p,
.dark .fa-tour-dialog .fa-tour-callout-included strong { color: #6ee7b7; }
.dark .fa-tour-dialog .driver-popover-footer { border-top-color: #1e293b; background-color: #1e293b; }
.dark .fa-tour-dialog .driver-popover-footer-btn { border-color: #334155; background-color: #1e293b; color: #d4d4d8; }
.dark .fa-tour-dialog .driver-popover-footer-btn:hover { background-color: rgba(51, 65, 85, 0.5); }
.dark .fa-tour-dialog .driver-popover-next-btn { border-color: #2563eb; background-color: #2563eb; color: #fff; }
.dark .fa-tour-dialog .driver-popover-next-btn:hover { border-color: #3b82f6; background-color: #3b82f6; }

/* The head keeps the breadcrumb on the left; this group holds the tour and Full screen buttons. */
.fa-workspace-actions { display: flex; align-items: center; gap: 8px; }

/* Same look as .fa-workspace-width (research-dashboard.css), but shown at every width. */
.fa-tour-replay { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--workspace-border); border-radius: 6px; background: var(--workspace-surface); color: var(--workspace-secondary); font-size: 12px; font-weight: 600; cursor: pointer; }
.fa-tour-replay:hover { color: var(--workspace-text); border-color: #93b4e6; }
.fa-tour-replay:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
@media (max-width: 639px) {
    .fa-tour-replay { padding: 6px 8px; }
    .fa-tour-replay-label { display: none; }
}
