/* ==========================================================================
   Quote Server — guided tours shell (EVO048): help buttons, welcome card and tour center.
   Always loaded (App.razor). The tour popover itself is themed in tours.css, loaded on demand.
   ========================================================================== */

/* ─── App bar "Ayuda" button with the "pending tour on this page" dot ───── */

.qs-tour-launcher { position: relative; display: inline-flex; }
.qs-tour-launcher__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--qs-brand-lime);
    box-shadow: 0 0 0 2px var(--qs-brand-petrol);
    pointer-events: none;
    animation: qs-tour-pulse 2.4s ease-out 3;
}
@keyframes qs-tour-pulse {
    0% { box-shadow: 0 0 0 2px var(--qs-brand-petrol), 0 0 0 2px rgba(180, 250, 50, 0.55); }
    70% { box-shadow: 0 0 0 2px var(--qs-brand-petrol), 0 0 0 10px rgba(180, 250, 50, 0); }
    100% { box-shadow: 0 0 0 2px var(--qs-brand-petrol), 0 0 0 0 rgba(180, 250, 50, 0); }
}

/* ─── "Tour de la página" button in the page header ─────────────────────── */

.qs-page-tour {
    white-space: nowrap;
}
.qs-page-tour--pending .mud-button-label::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--qs-brand-lime);
    box-shadow: 0 0 0 1px var(--qs-brand-petrol-600);
    vertical-align: middle;
}

/* ─── Welcome invitation (first visit) ──────────────────────────────────── */

.qs-tour-invite {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1400;
    width: min(360px, calc(100vw - 32px));
    padding: 20px;
    border-radius: var(--qs-radius-lg);
    background: var(--qs-brand-petrol);
    color: #E6EDEF;
    box-shadow: 0 18px 48px rgba(0, 22, 27, 0.35);
    overflow: hidden;
    animation: qs-tour-invite-in 320ms var(--qs-ease);
}
.qs-tour-invite::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--qs-brand-lime), transparent);
}
@keyframes qs-tour-invite-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
.qs-tour-invite__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.qs-tour-invite__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(180, 250, 50, 0.14);
    color: var(--qs-brand-lime);
}
.qs-tour-invite__title { margin: 0; font-size: 1rem; font-weight: 600; color: #fff; }
.qs-tour-invite__text { margin: 0 0 16px; font-size: 0.875rem; line-height: 1.5; color: #BFD0D4; }
.qs-tour-invite__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qs-tour-invite__primary,
.qs-tour-invite__ghost {
    padding: 8px 16px;
    border: 0;
    border-radius: var(--qs-radius);
    font: 600 0.8125rem/1.2 var(--qs-font);
    cursor: pointer;
    transition: background-color var(--qs-duration), color var(--qs-duration);
}
.qs-tour-invite__primary { background: var(--qs-brand-lime); color: var(--qs-brand-petrol); }
.qs-tour-invite__primary:hover { background: #C8FF66; }
.qs-tour-invite__ghost { background: transparent; color: #BFD0D4; }
.qs-tour-invite__ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.qs-tour-invite button:focus-visible { outline: 2px solid var(--qs-brand-lime); outline-offset: 2px; }

/* ─── Tour center dialog ────────────────────────────────────────────────── */

.qs-tour-center__head { display: flex; align-items: center; gap: 12px; }
.qs-tour-center__head-icon,
.qs-tour-card__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: var(--qs-radius);
    background: var(--qs-tint-brand);
    color: var(--mud-palette-primary);
}
.qs-tour-center__body { display: flex; flex-direction: column; gap: 20px; }
.qs-tour-center__search { margin-top: 4px; }

.qs-tour-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: var(--qs-radius);
    background: var(--qs-surface-muted);
}

.qs-tour-group { display: flex; flex-direction: column; gap: 8px; }
.qs-tour-group__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--qs-text-muted);
}

.qs-tour-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--qs-border);
    border-radius: var(--qs-radius);
    background: var(--qs-surface);
    transition: border-color var(--qs-duration), background-color var(--qs-duration);
}
.qs-tour-card:hover { border-color: var(--qs-border-strong); }
.qs-tour-card--done .qs-tour-card__icon { background: var(--qs-tint-success); color: var(--mud-palette-success); }
.qs-tour-card__main { flex: 1 1 auto; min-width: 0; }
.qs-tour-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qs-tour-card__title { margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--qs-text); }
.qs-tour-card__desc { margin: 2px 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--qs-text-muted); }
.qs-tour-card__meta { margin-top: 4px; font-size: 0.75rem; color: var(--qs-text-muted); font-variant-numeric: tabular-nums; }
.qs-tour-card__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }

@media (max-width: 600px) {
    .qs-tour-card { flex-wrap: wrap; }
    .qs-tour-card__actions { flex-direction: row; width: 100%; justify-content: flex-end; }
    .qs-tour-invite { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .qs-tour-launcher__dot, .qs-tour-invite { animation: none; }
}

/* The page header always renders its actions slot (it hosts the tour button): hide it when empty. */
.qs-page-header__actions:empty { display: none; }
