/* HR Workflow Demo - Premium Interactive */
.hr-workflow-demo {
    position: relative;
    background: linear-gradient(145deg, rgba(10, 10, 14, 0.9), rgba(16, 16, 22, 0.95));
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hr-workflow-demo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(0, 240, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hr-workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.hr-workflow-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.hr-workflow-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    padding: 0.25rem 0.6rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
}

.hr-status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: hrStatusPulse 2s ease-in-out infinite;
}

@keyframes hrStatusPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.hr-workflow-container {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem;
    position: relative;
    z-index: 1;
}

.hr-workflow-sidebar {
    width: 110px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hr-sidebar-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.hr-draggable-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary);
    cursor: grab;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.hr-draggable-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(0, 240, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hr-draggable-item:hover {
    border-color: var(--accent-secondary);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.hr-draggable-item:hover::before {
    opacity: 1;
}

.hr-draggable-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.hr-draggable-item.dragging {
    opacity: 0.4;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.hr-item-icon {
    font-size: 0.85rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.hr-workflow-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    min-height: 240px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.hr-workflow-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 20px,
            rgba(255, 255, 255, 0.01) 20px,
            rgba(255, 255, 255, 0.01) 21px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 20px,
            rgba(255, 255, 255, 0.01) 20px,
            rgba(255, 255, 255, 0.01) 21px);
    pointer-events: none;
    border-radius: 12px;
}

.hr-workflow-step {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    width: 100%;
    max-width: 220px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 2;
}

.hr-workflow-step:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.1);
}

.hr-workflow-step.hr-start-step {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.hr-workflow-step.hr-new-step {
    animation: stepAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stepAppear {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-15px);
    }

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

.hr-workflow-step.hr-executing {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2), 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: stepExecute 1.5s ease-in-out infinite;
}

@keyframes stepExecute {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), 0 8px 25px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 240, 255, 0.4), 0 8px 25px rgba(0, 0, 0, 0.3);
    }
}

.hr-workflow-step.hr-completed {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.02) 100%);
}

.hr-step-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hr-step-icon svg,
.hr-item-icon svg,
.hr-email-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hr-workflow-step.hr-start-step .hr-step-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

.hr-workflow-step.hr-executing .hr-step-icon {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.3) 0%, rgba(0, 240, 255, 0.1) 100%);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.hr-workflow-step.hr-completed .hr-step-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: rgba(34, 197, 94, 0.4);
}

.hr-step-content {
    flex: 1;
}

.hr-step-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.hr-step-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--text-muted);
}

.hr-step-actions {
    color: var(--text-muted);
    cursor: grab;
    padding: 0.3rem;
    font-size: 0.75rem;
    letter-spacing: -0.1em;
    opacity: 0.4;
    transition: all 0.2s ease;
}

.hr-step-actions:hover {
    color: var(--accent-secondary);
    opacity: 1;
}

.hr-workflow-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 28px;
    position: relative;
    z-index: 1;
}

.hr-connector-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.4) 0%, rgba(0, 240, 255, 0.4) 100%);
    border-radius: 1px;
    position: relative;
}

.hr-connector-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: rgba(139, 92, 246, 0.6);
    border-radius: 50%;
    animation: connectorPulse 2s ease-in-out infinite;
}

@keyframes connectorPulse {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(10px);
        opacity: 0.5;
    }
}

.hr-connector-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hr-connector-arrow svg {
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hr-drop-zone {
    width: 100%;
    max-width: 220px;
    padding: 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    background: rgba(255, 255, 255, 0.01);
    position: relative;
    z-index: 2;
}

.hr-drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.05);
    transform: scale(1.02);
}

.hr-drop-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.hr-drop-zone.drag-over .hr-drop-text {
    color: var(--accent);
}

.hr-drop-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.hr-drop-zone.drag-over .hr-drop-icon {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1);
}

.hr-workflow-footer {
    padding: 0.85rem 1.25rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.hr-email-preview {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.hr-email-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    animation: emailIconPulse 3s ease-in-out infinite;
}

@keyframes emailIconPulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(0, 240, 255, 0);
    }

    50% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    }
}

.hr-email-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hr-email-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.hr-email-value {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
}

.hr-workflow-run-btn {
    margin-left: auto;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(0, 240, 255, 0.2) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
}

.hr-workflow-run-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(0, 240, 255, 0.3) 100%);
    border-color: var(--accent-secondary);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

@media (max-width: 768px) {
    .hr-workflow-container {
        flex-direction: column;
    }

    .hr-workflow-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hr-draggable-item {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
}
