/* ===== Tutorial Overlay ===== */

/* Backdrop */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* Highlighted element - floats above the backdrop */
.tutorial-highlight {
    position: relative !important;
    z-index: 10001 !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.6), 0 0 20px rgba(124, 58, 237, 0.3) !important;
    border-radius: 8px !important;
    pointer-events: none;
    transition: box-shadow 0.3s ease;
}

/* Tooltip container */
.tutorial-tooltip {
    position: absolute;
    z-index: 10002;
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 360px;
    width: max-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(124, 58, 237, 0.1);
    pointer-events: auto;
    animation: tutorialFadeIn 0.3s ease;
}

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

/* Arrow pointing up (when tooltip is below target) */
.tutorial-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: var(--arrow-left, 32px);
    width: 16px;
    height: 16px;
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

/* Arrow pointing down (when tooltip is above target) */
.tutorial-tooltip.tooltip-above::before {
    top: auto;
    bottom: -8px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

/* Step counter */
.tutorial-step-counter {
    font-size: 12px;
    font-weight: 600;
    color: #7C3AED;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Title */
.tutorial-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-title .tutorial-icon {
    font-size: 18px;
}

/* Description */
.tutorial-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Dot indicators */
.tutorial-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

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

.tutorial-dot.active {
    background: #7C3AED;
}

.tutorial-dot.completed {
    background: #a78bfa;
}

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

.tutorial-btn-skip {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.tutorial-btn-skip:hover {
    color: #666;
    background: #f5f5f5;
}

.tutorial-btn-group {
    display: flex;
    gap: 8px;
}

.tutorial-btn-back {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tutorial-btn-back:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.tutorial-btn-next {
    padding: 8px 20px;
    border: none;
    background: #7C3AED;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tutorial-btn-next:hover {
    background: #6D28D9;
}

/* ===== Responsive ===== */

@media (max-width: 600px) {
    .tutorial-tooltip {
        position: fixed !important;
        bottom: 20px;
        left: 16px;
        right: 16px;
        top: auto !important;
        max-width: none;
        width: auto;
    }

    .tutorial-tooltip::before {
        display: none;
    }
}
