/* Scenario Generator Demo Animation */

.js-scenario-demo {
    position: relative;
    user-select: none;
}

/* Blinking cursor */
.demo-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background-color: var(--brand-primary, #143CFF);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: demo-cursor-blink 1s step-end infinite;
}

@keyframes demo-cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Prompt area */
.demo-prompt-area {
    min-height: 96px;
    line-height: 1.6;
    word-wrap: break-word;
    color: var(--bs-body-color);
}

.demo-prompt-placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Type selector mock — styled to match Bootstrap's form-select */
.demo-type-selector {
    display: flex;
    align-items: center;
    padding: 0.25rem 2rem 0.25rem 0.75rem;
    font-size: 0.875rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    max-width: 200px;
    white-space: nowrap;
}

.demo-type-selector.demo-type-focus {
    border-color: var(--brand-primary, #143CFF);
    box-shadow: 0 0 0 0.2rem rgba(20, 60, 255, 0.15);
}

/* File item with entrance animation */
.demo-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--bs-tertiary-bg, #f8f9fa);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.demo-file-item.demo-file-visible {
    opacity: 1;
    transform: translateY(0);
}

.demo-file-icon {
    color: #dc3545;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.demo-file-size {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Generate button press effect */
.js-demo-generate-btn.demo-btn-press {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

/* Generation animation (replaces card during generating phase) */
.demo-generation-animation {
    text-align: center;
    padding: 3rem 1rem;
}

.demo-generation-svg {
    display: block;
    margin: 0 auto;
    max-width: 200px;
    max-height: 200px;
    overflow: visible;
}

.demo-generation-text {
    margin-top: 1rem;
    margin-bottom: 0;
    opacity: 0.8;
}

/* Step indicators */
.demo-step {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.demo-step.demo-step-active {
    color: var(--brand-primary, #143CFF);
    background-color: rgba(20, 60, 255, 0.08);
}

.demo-step.demo-step-done {
    color: var(--bs-success, #198754);
}

.demo-step-connector {
    width: 24px;
    height: 1px;
    background-color: var(--bs-border-color, #dee2e6);
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .demo-prompt-area {
        min-height: 72px;
        font-size: 0.875rem;
    }

    .demo-step {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .demo-step-connector {
        width: 16px;
    }

    .demo-generation-svg {
        max-width: 160px;
        max-height: 160px;
    }

    .demo-generation-animation {
        padding: 2rem 0.5rem;
    }
}
