/* ===================================
   EMATHRIX INTERACTIVE GUIDE SYSTEM
   =================================== */

/* ── Guide Toggle Button ── */
.guide-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border: 1.5px solid var(--gray-300, #d1d5db);
    background: var(--white, #fff);
    color: var(--gray-600, #4b5563);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.guide-toggle-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #eef2ff;
}
.guide-toggle-btn.is-active {
    border-color: #4f46e5;
    background: #4f46e5;
    color: #fff;
}
.guide-toggle-btn svg {
    flex-shrink: 0;
}
.guide-toggle-label {
    pointer-events: none;
}

/* ── Admin topbar specific ── */
.navbar-links .guide-toggle-btn {
    margin-right: 0.5rem;
}

/* ── Customer sidebar specific ── */
.customer-sidebar .guide-toggle-btn {
    width: 100%;
    justify-content: center;
    border-radius: 6px;
}

/* ── Beacon (pulsing numbered dot) ── */
.guide-beacon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5);
    animation: guideBeaconPulse 2s ease-in-out infinite;
    transition: transform 0.15s;
    z-index: 10000;
    pointer-events: auto;
}
.guide-beacon:hover {
    transform: scale(1.2);
    animation: none;
}

@keyframes guideBeaconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
}

/* ── Tooltip ── */
.guide-tooltip {
    position: absolute;
    z-index: 10001;
    max-width: 320px;
    min-width: 220px;
    animation: guideTooltipIn 0.2s ease-out;
}
.guide-tooltip-content {
    background: #111827;
    color: #fff;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.84rem;
    line-height: 1.5;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.guide-tooltip-content p {
    margin: 0 0 0.65rem;
}
.guide-tooltip-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.guide-tooltip-dismiss {
    padding: 0.3rem 0.75rem;
    border: none;
    background: #4f46e5;
    color: #fff;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.guide-tooltip-dismiss:hover {
    background: #4338ca;
}
.guide-tooltip-close {
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: rgba(255,255,255,0.7);
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.guide-tooltip-close:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

@keyframes guideTooltipIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Highlighted Element ── */
.guide-highlighted {
    outline: 2.5px solid #4f46e5 !important;
    outline-offset: 3px;
    border-radius: 4px;
    transition: outline-color 0.3s;
}

/* ── Dark Mode Overrides ── */
html[data-theme="dark"] .guide-toggle-btn {
    border-color: #2A2F3E;
    background: #161A24;
    color: #8B92A8;
}
html[data-theme="dark"] .guide-toggle-btn:hover {
    border-color: #6C5CE7;
    color: #6C5CE7;
    background: rgba(108,92,231,0.15);
}
html[data-theme="dark"] .guide-toggle-btn.is-active {
    border-color: #6C5CE7;
    background: #6C5CE7;
    color: #E8ECF4;
}
html[data-theme="dark"] .guide-beacon {
    background: #6C5CE7;
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.5);
}
@keyframes guideBeaconPulseDark {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(108, 92, 231, 0); }
}
html[data-theme="dark"] .guide-beacon {
    animation-name: guideBeaconPulseDark;
}
html[data-theme="dark"] .guide-tooltip-content {
    background: #1E2330;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .guide-tooltip-dismiss {
    background: #6C5CE7;
}
html[data-theme="dark"] .guide-tooltip-dismiss:hover {
    background: #7E6FED;
}
html[data-theme="dark"] .guide-highlighted {
    outline-color: #6C5CE7 !important;
}
