/* ============================================================
   cx-guide.css — First-open feature guides (coach marks)
   Rendered by FeatureGuideHost (MainLayout, next to ToastContainer);
   positioning comes from guide-interop.js as inline top/left values.

   z-band 5200–5210: above all page chrome (topbar 1100, drawers
   ≤1300, page overlays ≤2000) AND above Syncfusion dialogs (4999/5000
   !important) and the cxe modal (5040+), so a guide can point at a
   control inside an open dialog (payment dialog). Below toasts.
   ============================================================ */

/* Invisible click-catcher under the spotlight; clicking anywhere = "Später". */
.cx-guide-catch {
    position: fixed;
    inset: 0;
    z-index: 5200;
    background: transparent;
}

/* Single-element spotlight: the huge spread shadow dims everything around the
   anchor, the inner ring gives it a warm copper edge. Never intercepts events. */
.cx-guide-spotlight {
    position: fixed;
    z-index: 5201;
    pointer-events: none;
    border-radius: 10px;
    box-shadow:
        0 0 0 9999px rgba(28, 25, 21, 0.38),
        0 0 0 3px rgba(184, 96, 31, 0.45);
    transition: top 0.28s var(--ease), left 0.28s var(--ease),
                width 0.28s var(--ease), height 0.28s var(--ease);
    animation: cx-guide-fade 0.22s ease-out;
}

/* Soft sonar ping around the anchor — one quiet outward pulse every 2.2s. */
.cx-guide-spotlight::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(184, 96, 31, 0.5);
    animation: cx-guide-pulse 2.2s var(--ease) infinite;
}

.cx-guide-bubble {
    position: fixed;
    z-index: 5210;
    background: var(--paper, #FAF7F2);
    border: 1px solid var(--hairline, rgba(28, 25, 21, 0.1));
    border-radius: 14px;
    box-shadow: var(--shadow-xl, 0 24px 48px rgba(28, 25, 21, 0.18));
    padding: 14px 16px 12px;
    outline: none;
    /* Gentle overshoot on entry; left glides when the spotlight hops to the
       next step (top/bottom snap by design — the arrow flips side anyway). */
    animation: cx-guide-pop 0.26s cubic-bezier(0.34, 1.4, 0.64, 1);
    transition: left 0.28s var(--ease), width 0.28s var(--ease);
}

.cx-guide-bubble__arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: var(--paper, #FAF7F2);
    transform: rotate(45deg);
}

.cx-guide-bubble.is-below .cx-guide-bubble__arrow {
    top: -7px;
    border-left: 1px solid var(--hairline, rgba(28, 25, 21, 0.1));
    border-top: 1px solid var(--hairline, rgba(28, 25, 21, 0.1));
}

/* Bubble lies over a viewport-high anchor — no side to point at. */
.cx-guide-bubble.is-inside .cx-guide-bubble__arrow {
    display: none;
}

.cx-guide-bubble.is-above .cx-guide-bubble__arrow {
    bottom: -7px;
    border-right: 1px solid var(--hairline, rgba(28, 25, 21, 0.1));
    border-bottom: 1px solid var(--hairline, rgba(28, 25, 21, 0.1));
}

.cx-guide-bubble__kicker {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--copper);
}

.cx-guide-bubble__kicker .bi {
    animation: cx-guide-twinkle 2.6s ease-in-out infinite;
}

.cx-guide-bubble__title {
    font-family: var(--font-display);
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 4px;
}

.cx-guide-bubble__text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--walnut, #4A4237);
}

.cx-guide-bubble__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.cx-guide-bubble__count {
    font-size: 11.5px;
    color: var(--stone);
    font-variant-numeric: tabular-nums;
}

.cx-guide-bubble__spacer {
    flex: 1;
}

.cx-guide-btn {
    border: none;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease,
                transform 0.15s ease, box-shadow 0.15s ease;
}

.cx-guide-btn:active {
    transform: scale(0.96);
}

.cx-guide-btn:focus-visible {
    outline: 2px solid var(--copper);
    outline-offset: 2px;
}

.cx-guide-btn--ghost {
    background: transparent;
    color: var(--stone);
}

.cx-guide-btn--ghost:hover {
    color: var(--ink);
    background: rgba(28, 25, 21, 0.06);
}

.cx-guide-btn--primary {
    background: var(--copper);
    color: #fff;
    box-shadow: 0 1px 2px rgba(28, 25, 21, 0.15);
}

.cx-guide-btn--primary:hover {
    background: var(--copper-dark, #9C4F16);
    transform: translateY(-1px);
    box-shadow: var(--shadow-copper, 0 4px 12px rgba(184, 96, 31, 0.3));
}

/* Small round "?" replay trigger (FeatureGuideTrigger ShowHelpIcon). */
.cx-guide-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--hairline, rgba(28, 25, 21, 0.1));
    border-radius: 50%;
    background: transparent;
    color: var(--stone);
    font-size: 11px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.cx-guide-help:hover {
    color: var(--copper);
    border-color: var(--copper);
}

@keyframes cx-guide-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes cx-guide-pop {
    from { opacity: 0; transform: translateY(6px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cx-guide-pulse {
    0%   { transform: scale(1); opacity: 0.9; }
    70%  { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1.12); opacity: 0; }
}

@keyframes cx-guide-twinkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50%      { transform: scale(1.18) rotate(8deg); opacity: 0.75; }
}

/* Liveliness is opt-out: with reduced motion the guide is calm and instant. */
@media (prefers-reduced-motion: reduce) {
    .cx-guide-spotlight,
    .cx-guide-bubble,
    .cx-guide-bubble__kicker .bi {
        animation: none;
        transition: none;
    }
    .cx-guide-spotlight::after {
        animation: none;
        opacity: 0;
    }
}
