/* Tutorial System Styles */

/* Overlay Container */
.tutorial-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.tutorial-overlay.tutorial-active {
    pointer-events: auto;
}

/* Backdrop */
.tutorial-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
}

/* Spotlight SVG */
.tutorial-spotlight-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.spotlight-cutout {
    transition: all 0.3s ease-out;
}

/* Highlighted Element */
.tutorial-highlight {
    position: relative;
    z-index: 10001 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5) !important;
    animation: tutorial-pulse 2s infinite;
}

@keyframes tutorial-pulse {
    0% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.3);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5);
    }
}

/* Tooltip */
.tutorial-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease-out;
    pointer-events: none;
    z-index: 10002;
}

.tutorial-tooltip.tutorial-tooltip-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tutorial-tooltip {
        background: #1f2937;
        color: #f3f4f6;
    }
}

/* Step Number */
.tutorial-step-number {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Title */
.tutorial-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.3;
}

@media (prefers-color-scheme: dark) {
    .tutorial-title {
        color: #f9fafb;
    }
}

/* Content */
.tutorial-content {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
}

@media (prefers-color-scheme: dark) {
    .tutorial-content {
        color: #d1d5db;
    }
}

/* Actions */
.tutorial-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

/* Buttons */
.tutorial-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tutorial-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tutorial-btn svg {
    width: 16px;
    height: 16px;
}

.tutorial-btn-primary {
    background: #3b82f6;
    color: white;
}

.tutorial-btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.tutorial-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.tutorial-btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
    .tutorial-btn-secondary {
        background: #374151;
        color: #f3f4f6;
    }
    
    .tutorial-btn-secondary:hover:not(:disabled) {
        background: #4b5563;
    }
}

.tutorial-skip {
    font-size: 13px;
    padding: 6px 12px;
}

/* Progress Bar */
.tutorial-progress {
    margin-top: 16px;
}

.tutorial-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.tutorial-progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 2px;
    transition: width 0.3s ease-out;
    width: 0;
}

/* Completion Screen */
.tutorial-completion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: all 0.3s ease-out;
    pointer-events: none;
}

.tutorial-completion.tutorial-completion-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

@media (prefers-color-scheme: dark) {
    .tutorial-completion {
        background: #1f2937;
        color: #f3f4f6;
    }
}

.tutorial-completion-icon {
    margin-bottom: 24px;
}

.tutorial-completion-icon svg {
    stroke: #10b981;
    animation: tutorial-checkmark 0.6s ease-out;
}

@keyframes tutorial-checkmark {
    from {
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.tutorial-completion h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111827;
}

.tutorial-completion p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
}

@media (prefers-color-scheme: dark) {
    .tutorial-completion h2 {
        color: #f9fafb;
    }
    
    .tutorial-completion p {
        color: #d1d5db;
    }
}

.tutorial-finish {
    padding: 12px 32px;
    font-size: 16px;
}

/* Success Notification */
.tutorial-success-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #10b981;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease-out;
    z-index: 9999;
}

.tutorial-success-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-content svg {
    flex-shrink: 0;
}

/* Mobile Styles */
@media (max-width: 640px) {
    .tutorial-tooltip {
        max-width: calc(100vw - 32px);
        margin: 16px;
    }
    
    .tutorial-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .tutorial-skip {
        order: 2;
    }
    
    .tutorial-completion {
        max-width: calc(100vw - 32px);
        padding: 32px 24px;
    }
    
    .tutorial-success-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

/* Tooltip Arrow */
.tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
}

@media (prefers-color-scheme: dark) {
    .tutorial-tooltip::before {
        background: #1f2937;
    }
}

/* Arrow positions based on tooltip placement */
.tutorial-tooltip[data-placement="top"]::before {
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
}

.tutorial-tooltip[data-placement="bottom"]::before {
    top: -6px;
    left: 50%;
    margin-left: -6px;
}

.tutorial-tooltip[data-placement="left"]::before {
    right: -6px;
    top: 50%;
    margin-top: -6px;
}

.tutorial-tooltip[data-placement="right"]::before {
    left: -6px;
    top: 50%;
    margin-top: -6px;
}