/* ============================================
   ICE SELLER - Tutorial System Styles
   Version: 1.0
   Ready to use - just link in your HTML
   ============================================ */

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

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

/* Spotlight Effect */
.tutorial-spotlight {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    transition: all 0.4s ease;
    pointer-events: none;
}

.tutorial-spotlight::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    animation: spotlight-pulse 2s infinite;
}

@keyframes spotlight-pulse {
    0%, 100% { border-color: #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); }
    50% { border-color: #60a5fa; box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
}

/* Tooltip / Step Card */
.tutorial-tooltip {
    position: absolute;
    z-index: 10000;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 380px;
    min-width: 0;
    width: calc(100vw - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    font-family: 'Prompt', sans-serif;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tutorial-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip Arrow */
.tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

.tutorial-tooltip.arrow-top::before {
    top: -8px;
    left: 50%;
    margin-left: -8px;
}

.tutorial-tooltip.arrow-bottom::before {
    bottom: -8px;
    left: 50%;
    margin-left: -8px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.tutorial-tooltip.arrow-left::before {
    left: -8px;
    top: 50%;
    margin-top: -8px;
}

.tutorial-tooltip.arrow-right::before {
    right: -8px;
    top: 50%;
    margin-top: -8px;
    box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.05);
}

/* Step Header */
.tutorial-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tutorial-step-icon {
    display: none;
}

.tutorial-step-number {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tutorial-step-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

/* Step Content */
.tutorial-step-content {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tutorial-step-content strong {
    color: #334155;
}

/* Progress Bar */
.tutorial-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.tutorial-progress-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.3s ease;
}

.tutorial-progress-dot.completed {
    background: #3b82f6;
}

.tutorial-progress-dot.active {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    animation: progress-glow 1.5s infinite;
}

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

/* Navigation Buttons */
.tutorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.tutorial-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Prompt', sans-serif;
}

.tutorial-btn:active {
    transform: scale(0.97);
}

.tutorial-btn-skip {
    background: transparent;
    color: #94a3b8;
    padding: 10px 12px;
}

.tutorial-btn-skip:hover {
    color: #64748b;
}

.tutorial-btn-prev {
    background: #f1f5f9;
    color: #475569;
}

.tutorial-btn-prev:hover {
    background: #e2e8f0;
}

.tutorial-btn-next {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tutorial-btn-next:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.tutorial-btn-finish {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tutorial-btn-finish:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* ============================================
   Welcome Modal
   ============================================ */

.tutorial-welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 16px;
    box-sizing: border-box;
}

.tutorial-welcome-overlay.visible {
    opacity: 1;
}

.tutorial-welcome-card {
    background: linear-gradient(135deg, var(--primary-dark, #0f172a) 0%, var(--primary-color, #1e3a8a) 100%);
    border-radius: 16px;
    padding: 32px 28px 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.tutorial-welcome-overlay.visible .tutorial-welcome-card {
    transform: scale(1);
}

.tutorial-welcome-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px;
}

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

.tutorial-welcome-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    font-family: 'Prompt', sans-serif;
    letter-spacing: -0.3px;
}

.tutorial-welcome-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.5;
    font-family: 'Prompt', sans-serif;
}

.tutorial-welcome-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
}

.tutorial-welcome-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 14px;
    color: #334155;
    font-family: 'Prompt', sans-serif;
}

.tutorial-welcome-feature-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.tutorial-welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tutorial-welcome-btn-start {
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: #ffffff;
    color: #1e3a8a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    font-family: 'Prompt', sans-serif;
    width: 100%;
    letter-spacing: 0.3px;
}

.tutorial-welcome-btn-start:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    background: #f8fafc;
}

.tutorial-welcome-btn-start:active {
    transform: translateY(0) scale(0.98);
}

.tutorial-welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tutorial-welcome-btn-skip {
    padding: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    transition: color 0.2s;
}

.tutorial-welcome-btn-skip:hover {
    color: rgba(255, 255, 255, 0.7);
}

.tutorial-welcome-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
}

.tutorial-welcome-divider::before,
.tutorial-welcome-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Floating Help Button
   ============================================ */

.tutorial-help-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    z-index: 9990;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

/* Help Menu */
.tutorial-help-menu {
    position: fixed;
    bottom: 90px;
    right: 16px;
    background: #ffffff;
    border-radius: 16px;
    padding: 8px;
    min-width: 220px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 9991;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-sizing: border-box;
}

.tutorial-help-menu.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tutorial-help-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Prompt', sans-serif;
    text-align: left;
}

.tutorial-help-menu-item:hover {
    background: #f1f5f9;
}

.tutorial-help-menu-item-icon {
    display: none;
}

/* ============================================
   Completion Celebration
   ============================================ */

.tutorial-complete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 16px;
    box-sizing: border-box;
}

.tutorial-complete-overlay.visible {
    opacity: 1;
}

.tutorial-complete-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.5s ease;
    box-sizing: border-box;
}

.tutorial-complete-overlay.visible .tutorial-complete-card {
    transform: scale(1);
}

.tutorial-complete-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: complete-bounce 0.6s ease;
}

@keyframes complete-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.tutorial-complete-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    font-family: 'Prompt', sans-serif;
}

.tutorial-complete-text {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
    font-family: 'Prompt', sans-serif;
}

.tutorial-complete-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    font-family: 'Prompt', sans-serif;
    width: 100%;
}

.tutorial-complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

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

@media (max-width: 480px) {
    .tutorial-tooltip {
        max-width: calc(100vw - 32px);
        min-width: unset;
        padding: 20px;
    }

    .tutorial-welcome-card {
        padding: 28px 20px;
    }

    .tutorial-welcome-title {
        font-size: 20px;
    }

    .tutorial-help-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .tutorial-help-menu {
        bottom: 74px;
        right: 16px;
    }

    .tutorial-step-title {
        font-size: 16px;
    }
}

/* ============================================
   Highlighted Element
   ============================================ */

.tutorial-highlight {
    position: relative;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

/* ============================================
   Highlight Pulse Ring
   ============================================ */

.tutorial-ring-highlight {
    position: relative;
}

.tutorial-ring-highlight::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 3px solid #3b82f6;
    border-radius: 16px;
    animation: ring-pulse 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 9000;
}

@keyframes ring-pulse {
    0%, 100% { border-color: #3b82f6; box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { border-color: #60a5fa; box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

@keyframes ring-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

/* Dark theme variant (for driver pages) */
.tutorial-tooltip.dark-theme {
    background: #1e293b;
    color: #e2e8f0;
}

.tutorial-tooltip.dark-theme .tutorial-step-title {
    color: #f1f5f9;
}

.tutorial-tooltip.dark-theme .tutorial-step-content {
    color: #94a3b8;
}

.tutorial-tooltip.dark-theme .tutorial-step-content strong {
    color: #cbd5e1;
}

.tutorial-tooltip.dark-theme::before {
    background: #1e293b;
}

.tutorial-tooltip.dark-theme .tutorial-btn-prev {
    background: #334155;
    color: #e2e8f0;
}

.tutorial-tooltip.dark-theme .tutorial-progress-dot {
    background: #334155;
}
