/* Preview banner — shown only on *.dev.johnsen.ai deployments */

.preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4a9eff 0%, #7366ff 100%);
    color: #fff;
    padding: 8px 16px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-wrap: nowrap;
    height: 44px;
}

.preview-banner a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: background 0.2s;
    white-space: nowrap;
}

.preview-banner a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.preview-banner__label {
    font-weight: 600;
}

/* Push the existing header down when banner is present */
body.has-preview-banner .eclipse-header {
    top: 44px;
}

/* Status indicator */

.preview-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.preview-status--deploying {
    animation: preview-pulse-bg 1.5s ease-in-out infinite;
}

.preview-status--ready {
    background: rgba(34, 197, 94, 0.3);
}

.preview-status--update {
    background: rgba(251, 191, 36, 0.9);
    color: #000;
    cursor: pointer;
    font-weight: 600;
    animation: preview-pulse-bg 1s ease-in-out infinite;
}

.preview-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.preview-status__dot--deploying {
    background: #fbbf24;
    animation: preview-pulse 1s ease-in-out infinite;
}

.preview-status__dot--ready {
    background: #22c55e;
}

.preview-status__dot--update {
    background: #000;
}

@keyframes preview-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes preview-pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mobile */

@media (max-width: 600px) {
    .preview-banner {
        padding: 6px 10px;
        gap: 6px;
        font-size: 12px;
        height: 36px;
    }

    .preview-banner a {
        padding: 3px 8px;
        font-size: 11px;
    }

    .preview-status {
        padding: 3px 8px;
        font-size: 11px;
        gap: 4px;
    }

    .preview-status__dot {
        width: 6px;
        height: 6px;
    }

    body.has-preview-banner .eclipse-header {
        top: 36px;
    }
}
