﻿/* -------------------------------------------------------------------------------------------------
   Tutorial Overlay Styles
   All overlay elements are appended directly to <body> via JS,
   so z-index values here must beat the Radzen header/sidebar (~1000).
   ------------------------------------------------------------------------------------------------- */

/* ── Full-screen dark backdrop ── */
.tutorial-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* ── SVG mask layer that "cuts out" the highlighted element ── */
.tutorial-backdrop svg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Tooltip card ── */
.tutorial-tooltip {
    position: fixed;
    z-index: 10002;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    padding: 16px 20px;
    max-width: min(380px, calc(100vw - 32px));
    min-width: 220px;
    animation: tutorial-fade-in 0.25s ease;
    pointer-events: auto;
    box-sizing: border-box;
}

.tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
}

/* Arrow positions */
.tutorial-tooltip.arrow-top::before    { top: -7px;  left: 24px; }
.tutorial-tooltip.arrow-bottom::before { bottom: -7px; left: 24px; }
.tutorial-tooltip.arrow-left::before   { left: -7px;  top: 24px; }
.tutorial-tooltip.arrow-right::before  { right: -7px; top: 24px; }

/* ── Step indicator dots ── */
.tutorial-dots {
    display: flex;
    gap: 6px;
    margin: 12px 0 4px;
    justify-content: center;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.2s;
    cursor: pointer;
}

.tutorial-dot.active {
    background: var(--rz-primary, #1b73e8);
}

/* ── Title / description ── */
.tutorial-title {
    font-size: 1rem;
    font-weight: 600;
    color: #003247;
    margin: 0 0 6px;
    line-height: 1.3;
}

.tutorial-description {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.45;
    margin: 0 0 14px;
}

/* ── Step counter ── */
.tutorial-step-counter {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 8px;
}

/* ── Button row ── */
.tutorial-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tutorial-btn {
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.tutorial-btn-primary {
    background: var(--rz-primary, #1b73e8);
    color: #fff;
}

.tutorial-btn-primary:hover {
    background: var(--rz-primary-dark, #155db5);
}

.tutorial-btn-secondary {
    background: transparent;
    color: #555;
}

.tutorial-btn-secondary:hover {
    background: #f0f0f0;
}

.tutorial-btn-skip {
    background: transparent;
    color: #999;
    font-size: 0.8rem;
    text-decoration: underline;
    padding: 6px 8px;
}

/* ── Pulse ring around highlighted element ── */
.tutorial-highlight-ring {
    position: fixed;
    z-index: 10001;
    border: 2px solid var(--rz-primary, #1b73e8);
    border-radius: 6px;
    pointer-events: none;
    animation: tutorial-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 4px rgba(27, 115, 232, 0.18);
}

@keyframes tutorial-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(27, 115, 232, 0.18); }
    50%      { box-shadow: 0 0 0 10px rgba(27, 115, 232, 0.06); }
}

@keyframes tutorial-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive adjustments ── */
@media (max-width: 480px) {
    .tutorial-tooltip {
        padding: 12px 14px;
        min-width: 180px;
    }

    .tutorial-title {
        font-size: 0.9rem;
    }

    .tutorial-description {
        font-size: 0.8rem;
    }

    .tutorial-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}
