/* Workflow Visualizer Styles */
.workflow-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 16px;
}

.workflow-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.workflow-status.idle {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.workflow-status.running {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.workflow-status.waiting {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.workflow-status.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.stepper-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.step-line {
    position: absolute;
    top: 25px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--border-light);
    z-index: -1;
}

.step:last-child .step-line {
    display: none;
}

/* Active State */
.step.active .step-icon {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 700;
}

/* Completed State */
.step.completed .step-icon {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.step.completed .step-line {
    background: var(--success);
}

/* Pulsing effect for Waiting */
.step.pulsing .step-icon {
    animation: pulse-orange 2s infinite;
    border-color: var(--warning);
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.workflow-body {
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--radius-md);
}

.status-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.approval-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    color: var(--warning);
    font-size: 0.9rem;
}

.workflow-footer {
    margin-top: 10px;
    text-align: right;
    color: var(--text-muted);
}

/* Notification Indicator */
.notification-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    color: #60a5fa;
    animation: slideInNotification 0.5s ease-out;
}

.notification-indicator .mail-icon {
    font-size: 1rem;
    animation: mailBounce 2s infinite;
}

.notification-indicator .notification-text {
    font-weight: 600;
    white-space: nowrap;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mailBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification-indicator {
        font-size: 0.65rem;
        padding: 3px 8px;
        gap: 4px;
    }

    .notification-indicator .mail-icon {
        font-size: 0.85rem;
    }

    .notification-text {
        display: none;
        /* Hide text on mobile, show only icon */
    }

    /* Fix Stepper Alignment */
    .step-label {
        font-size: 0.7rem;
        text-align: center;
        margin-top: 4px;
        white-space: normal;
        /* Allow wrap */
        line-height: 1.2;
    }

    .step-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .stepper-container {
        padding: 0 5px;
        margin-bottom: 24px;
    }

    .step-line {
        top: 18px;
        /* Adjustment for 36px icon */
    }

    /* Notification positioning */
    .notification-indicator {
        margin-top: 4px;
    }

    /* Action Buttons */
    .button-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .button-group button {
        width: 100%;
    }
}