/* Portfolio demo chrome + autopilot overlay */

.me-demo-header {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.me-demo-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.me-demo-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
}

.me-demo-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.me-demo-btn {
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    padding: 8px 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
}

.me-demo-btn-primary {
    color: #fff;
    background: #ff8227;
    border-color: #ff8227;
}

.me-demo-btn-primary:hover {
    background: #e6741f;
}

.me-demo-btn-secondary {
    color: #475569;
    background: #fff;
    border-color: #e2e8f0;
}

.me-demo-btn-secondary:hover {
    background: #f8fafc;
}

.me-demo-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.me-demo-graph-stage {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 24px 32px;
}

.me-demo-graph-header {
    margin-bottom: 12px;
}

.me-demo-graph-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.me-demo-graph-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
}

.me-demo-graph-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    padding: 20px 20px 24px;
    overflow-x: auto;
}

.me-graph-output {
    min-width: min(100%, 980px);
    isolation: isolate;
}

.me-graph-output .graphical-summary {
    width: 100%;
    max-width: 980px;
}

.me-graph-output .table-top-header {
    width: 100%;
    max-width: 980px;
}

.manual-events {
    isolation: isolate;
}

.me-tour-cursor {
    position: fixed;
    z-index: 10001;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(255, 130, 39, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition:
        opacity 0.35s ease,
        top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s ease;
    will-change: top, left, opacity, transform;
}

.me-tour-cursor.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.me-tour-cursor.is-dragging {
    transform: translate(-50%, -50%) scale(0.95);
    background: rgba(255, 130, 39, 1);
}

.me-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.me-tour-overlay.is-visible {
    opacity: 1;
}

.me-tour-dim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.me-tour-spotlight {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.36s ease;
    pointer-events: none;
}

.me-tour-spotlight.is-visible {
    opacity: 1;
}

.me-tour-spotlight.is-instant {
    transition: none;
}

.me-tour-caption {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 9999;
    width: min(640px, calc(100vw - 32px));
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.38s ease;
}

.me-tour-caption.is-visible {
    opacity: 1;
    transform: translateX(-50%);
}

.me-tour-caption-step {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff8227;
    margin-bottom: 6px;
}

.me-tour-caption-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.me-tour-caption-text {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e1;
}

.me-tour-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #ff8227;
    z-index: 10000;
    width: 0;
    transition: width 0.4s ease;
}

.me-tour-pulse {
    animation: me-tour-pulse 1.4s ease-in-out infinite;
}

@keyframes me-tour-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 130, 39, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(255, 130, 39, 0); }
}

@media (max-width: 640px) {
    .me-demo-header {
        padding: 16px 16px 8px;
    }

    .me-demo-stage {
        padding: 0 12px 24px;
    }

    .me-tour-caption {
        bottom: 16px;
    }
}
