/*
 * ADONIS CRM — Адоша Per-Page Guide Styles
 * FAB button, spotlight, tooltip, welcome card, finish toast
 */

/* ═══ Floating "?" FAB button ════════════════════════════ */

.adosha-fab {
    position: fixed;
    bottom: 28px;
    right: 90px;
    z-index: 8900;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1a0808 0%, #2c1212 55%, #1c1c1c 100%);
    border: 1.5px solid rgba(220, 38, 38, 0.5);
    cursor: pointer;
    box-shadow:
        0 4px 22px rgba(220, 38, 38, 0.45),
        0 0 0 5px rgba(220, 38, 38, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: adosha-fab-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes adosha-fab-in {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.adosha-fab::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(
        rgba(220,38,38,0.7) 0deg,
        rgba(239,68,68,0.5) 120deg,
        rgba(185,28,28,0.35) 220deg,
        rgba(220,38,38,0.7) 360deg
    );
    animation: adosha-spin 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
    mask: radial-gradient(circle at center, transparent 60%, black 62%);
    -webkit-mask: radial-gradient(circle at center, transparent 60%, black 62%);
}

.adosha-fab:hover::before { opacity: 1; }

@keyframes adosha-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.adosha-fab:hover {
    transform: scale(1.1);
    border-color: rgba(220, 38, 38, 0.9);
    box-shadow:
        0 6px 30px rgba(220, 38, 38, 0.6),
        0 0 0 6px rgba(220, 38, 38, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.adosha-fab:active { transform: scale(0.95); }

.adosha-fab-icon {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    font-family: Georgia, serif;
    user-select: none;
}

/* ═══ Spotlight overlay ══════════════════════════════════ */

.tour-spotlight {
    position: fixed;
    z-index: 9001;
    border-radius: 8px;
    pointer-events: auto;
    transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.72),
        0 0 0 3px var(--accent, #dc2626),
        0 0 20px 4px rgba(220, 38, 38, 0.3);
    animation: tour-pulse 1.8s ease-in-out infinite;
}

@keyframes tour-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 9999px rgba(0, 0, 0, 0.72),
            0 0 0 3px var(--accent, #dc2626),
            0 0 20px 4px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow:
            0 0 0 9999px rgba(0, 0, 0, 0.72),
            0 0 0 5px var(--accent, #dc2626),
            0 0 30px 8px rgba(220, 38, 38, 0.45);
    }
}

/* Full overlay used when no target (welcome/finish steps) */
.tour-overlay-dark {
    position: fixed;
    inset: 0;
    z-index: 9001;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    animation: tour-fade-in 0.25s ease;
}

@keyframes tour-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ═══ Tooltip ════════════════════════════════════════════ */

.tour-tooltip {
    position: fixed;
    z-index: 9002;
    background: var(--bg-secondary, #161622);
    border: 1px solid var(--accent, #dc2626);
    border-radius: 16px;
    padding: 22px 24px 20px;
    min-width: 290px;
    max-width: 360px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(220, 38, 38, 0.12);
    animation: tour-tooltip-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tour-tooltip-in {
    from { opacity: 0; transform: scale(0.88) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Adosha header inside tooltip */
.tour-tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.tour-adosha-mini {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-tooltip-step {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent, #dc2626);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.tour-tooltip-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 10px;
    line-height: 1.3;
}

.tour-tooltip-text {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
    margin-bottom: 18px;
}

/* ═══ Progress dots ══════════════════════════════════════ */

.tour-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 16px;
}

.tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border, rgba(255,255,255,0.12));
    transition: background 0.2s, transform 0.2s;
}

.tour-dot.active {
    background: var(--accent, #dc2626);
    transform: scale(1.4);
}

.tour-dot.done {
    background: rgba(220, 38, 38, 0.35);
}

/* ═══ Navigation buttons ════════════════════════════════ */

.tour-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.tour-btn-skip {
    background: none;
    border: none;
    color: var(--text-muted, #64748b);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    margin-right: auto;
    transition: color 0.15s;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tour-btn-skip:hover { color: var(--text-secondary, #94a3b8); }

.tour-btn-prev {
    background: none;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    color: var(--text-secondary, #94a3b8);
    font-size: 13px;
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.tour-btn-prev:hover {
    border-color: var(--accent, #dc2626);
    color: var(--text-primary, #e2e8f0);
}

.tour-btn-next {
    background: var(--accent, #dc2626);
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.tour-btn-next:hover {
    background: var(--accent-hover, #b91c1c);
    transform: translateY(-1px);
}

.tour-btn-next:active { transform: translateY(0); }

/* Adosha avatar on welcome card */
.tour-adosha-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.3);
    animation: tour-bounce 2s ease-in-out infinite;
}

/* ═══ Welcome / Finish card ══════════════════════════════ */

.tour-center-card {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 9003;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary, #161622);
    border: 1px solid var(--accent, #dc2626);
    border-radius: 20px;
    padding: 36px 40px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    animation: tour-tooltip-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tour-center-emoji {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    animation: tour-bounce 1.5s ease-in-out infinite;
}

@keyframes tour-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.tour-center-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 12px;
}

.tour-center-text {
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
    margin-bottom: 24px;
}

.tour-center-btn {
    background: var(--accent, #dc2626);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    padding: 12px 28px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    width: 100%;
}

.tour-center-btn:hover { background: var(--accent-hover, #b91c1c); transform: translateY(-1px); }

.tour-center-skip {
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--text-muted, #64748b);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.tour-center-skip:hover { color: var(--text-secondary, #94a3b8); }

/* ═══ Finish toast ════════════════════════════════════════ */

.tour-finish-toast {
    position: fixed;
    bottom: 88px;
    right: 28px;
    z-index: 9010;
    background: var(--bg-secondary, #161622);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: tour-fade-in 0.25s ease;
    max-width: 280px;
    line-height: 1.5;
}

.tour-finish-toast b { color: var(--accent, #dc2626); }

.tour-finish-toast-out {
    animation: tour-fade-out 0.35s ease forwards;
}

@keyframes tour-fade-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(10px); }
}
