/* eBaySync Dashboard Tour — Vanilla CSS */

/* Overlay */
#tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: transparent;
    pointer-events: auto;
    display: none;
}
#tour-overlay.active { display: block; }

/* Spotlight */
#tour-spotlight {
    position: fixed;
    z-index: 9001;
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    transition: top 0.4s ease, left 0.4s ease, width 0.4s ease, height 0.4s ease;
    pointer-events: none;
    animation: tour-pulse 2s infinite;
}

@keyframes tour-pulse {
    0%   { box-shadow: 0 0 0 9999px rgba(0,0,0,0.75), 0 0 0 0 rgba(233,69,96,0.6); }
    70%  { box-shadow: 0 0 0 9999px rgba(0,0,0,0.75), 0 0 0 14px rgba(233,69,96,0); }
    100% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.75), 0 0 0 0 rgba(233,69,96,0); }
}

/* Tooltip */
#tour-tooltip {
    position: fixed;
    z-index: 9002;
    background: #1e1e2e;
    border: 1px solid #e94560;
    border-radius: 8px;
    padding: 16px 20px;
    max-width: 400px;
    min-width: 260px;
    color: #eee;
    font-size: 0.9em;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    transition: top 0.3s ease, left 0.3s ease, opacity 0.3s ease;
    display: none;
}
#tour-tooltip.active { display: block; }

#tour-tooltip .tour-module-name {
    font-size: 0.75em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
#tour-tooltip .tour-step-title {
    font-weight: 700;
    font-size: 1.05em;
    margin-bottom: 6px;
    color: #e94560;
}
#tour-tooltip .tour-step-text {
    line-height: 1.5;
    margin-bottom: 8px;
}
#tour-tooltip .tour-step-counter {
    font-size: 0.78em;
    color: #666;
}
#tour-tooltip .tour-audio-status {
    font-size: 0.75em;
    color: #555;
    margin-top: 4px;
}

/* Tooltip arrow */
#tour-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #1e1e2e;
    border: 1px solid #e94560;
    transform: rotate(45deg);
}
#tour-tooltip.pos-bottom::before { top: -7px; left: 24px; border-right: none; border-bottom: none; }
#tour-tooltip.pos-top::before { bottom: -7px; left: 24px; border-left: none; border-top: none; }
#tour-tooltip.pos-right::before { left: -7px; top: 16px; border-right: none; border-top: none; }
#tour-tooltip.pos-left::before { right: -7px; top: 16px; border-left: none; border-bottom: none; }

/* Toolbar */
#tour-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9003;
    background: #1e1e2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 8px 16px;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    font-size: 0.85em;
    color: #eee;
}
#tour-toolbar.active { display: flex; }

#tour-toolbar button {
    background: #2a2a3e;
    border: 1px solid #444;
    color: #eee;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    min-width: 34px;
    transition: background 0.2s;
}
#tour-toolbar button:hover { background: #e94560; color: #fff; }
#tour-toolbar button:disabled { opacity: 0.3; cursor: default; }
#tour-toolbar button:disabled:hover { background: #2a2a3e; }

/* Record button */
#tour-btn-record { color: #e94560; }
#tour-btn-record.recording {
    background: #e94560;
    color: #fff;
    animation: tour-record-blink 1s infinite;
}
@keyframes tour-record-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#tour-progress-bar {
    width: 120px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
}
#tour-progress-fill {
    height: 100%;
    background: #e94560;
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0;
}

#tour-progress-text {
    font-size: 0.82em;
    color: #888;
    white-space: nowrap;
}

/* Module Selector */
#tour-module-selector {
    position: fixed;
    inset: 0;
    z-index: 9010;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
}
#tour-module-selector.active { display: flex; }

#tour-selector-card {
    background: #1e1e2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px 32px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: #eee;
}

#tour-selector-card h2 {
    margin: 0 0 4px 0;
    font-size: 1.2em;
    color: #e94560;
}
#tour-selector-card .tour-sel-subtitle {
    font-size: 0.82em;
    color: #888;
    margin-bottom: 16px;
}

/* Language switch */
.tour-lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}
.tour-lang-label {
    font-size: 0.82em;
    color: #888;
    margin-right: 4px;
}
.tour-lang-btn {
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #2a2a3e;
    color: #888;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85em;
    transition: all 0.2s;
}
.tour-lang-btn:hover {
    color: #eee;
    border-color: #e94560;
}
.tour-lang-btn.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

.tour-module-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a3e;
}
.tour-module-row:last-child { border-bottom: none; }

.tour-module-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e94560;
    cursor: pointer;
}
.tour-module-row .tour-mod-icon { font-size: 1.1em; }
.tour-module-row .tour-mod-name { flex: 1; font-weight: 600; font-size: 0.92em; }
.tour-module-row .tour-mod-steps { font-size: 0.78em; color: #888; }

.tour-sel-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}
.tour-sel-actions button {
    padding: 8px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95em;
}
#tour-start-btn {
    background: #e94560;
    color: #fff;
}
#tour-start-btn:hover { background: #ff6b81; }
#tour-cancel-btn {
    background: transparent;
    color: #888;
    border: 1px solid #444 !important;
}
#tour-cancel-btn:hover { color: #eee; }
.tour-sel-toggle {
    font-size: 0.82em;
    color: #e94560;
    cursor: pointer;
    margin-left: auto;
}
.tour-sel-toggle:hover { text-decoration: underline; }

.tour-sel-summary {
    font-size: 0.82em;
    color: #888;
    margin-top: 12px;
}

/* Resume banner */
#tour-resume-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9005;
    background: #1e1e2e;
    border-bottom: 2px solid #e94560;
    padding: 8px 16px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.88em;
    color: #eee;
}
#tour-resume-banner.active { display: flex; }
#tour-resume-banner button {
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88em;
}
#tour-resume-yes { background: #e94560; color: #fff; }
#tour-resume-no { background: #2a2a3e; color: #888; border: 1px solid #444; }
