/* قسم عرض الفلو التفاعلي (شكلي) أسفل الهوم */

.dl-flow-show {
    position: relative;
    padding: 2.5rem 0 3.5rem;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .dl-flow-show {
        padding: 3rem 0 5rem;
    }
}

.dl-flow-show__head {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 1.75rem;
}

.dl-flow-show__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .85rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    border: 1px solid rgba(79, 240, 127, .25);
    background: rgba(79, 240, 127, .08);
    color: #4ff07f;
    font-size: .75rem;
    font-weight: 800;
}

.dl-flow-show__title {
    margin: 0 0 .75rem;
    font-size: clamp(1.55rem, 3.2vw, 2.45rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--on-surface, #f8fafc);
}

.dl-flow-show__title span {
    color: #4ff07f;
}

.dl-flow-show__desc {
    margin: 0;
    color: rgba(226, 232, 240, .78);
    font-size: .98rem;
    line-height: 1.85;
}

.dl-flow-show__stage {
    position: relative;
    border-radius: 1.35rem;
    border: 1px solid rgba(255, 255, 255, .1);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015)),
        rgba(15, 23, 42, .55);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.dl-flow-show__toolbar {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(2, 6, 23, .35);
    user-select: none;
}

.dl-flow-show__dot {
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: #64748b;
}

.dl-flow-show__dot--r { background: #f87171; }
.dl-flow-show__dot--y { background: #fbbf24; }
.dl-flow-show__dot--g { background: #34d399; }

.dl-flow-show__toolbar-title {
    margin-inline-start: .4rem;
    font-size: .78rem;
    font-weight: 800;
    color: rgba(226, 232, 240, .85);
}

.dl-flow-show__tools {
    margin-inline-start: auto;
    display: flex;
    gap: .35rem;
}

.dl-flow-show__tool {
    width: 2rem;
    height: 2rem;
    border-radius: .55rem;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: rgba(226, 232, 240, .65);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    pointer-events: none;
}

.dl-flow-show__canvas-wrap {
    position: relative;
    height: min(58vh, 420px);
    cursor: grab;
    touch-action: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(79, 240, 127, .07), transparent 60%),
        radial-gradient(circle at 1px 1px, rgba(148, 163, 184, .22) 1px, transparent 0);
    background-size: auto, 22px 22px;
}

.dl-flow-show__canvas-wrap.is-dragging {
    cursor: grabbing;
}

.dl-flow-show__world {
    position: absolute;
    top: 0;
    left: 0;
    width: 860px;
    height: 360px;
    transform-origin: 0 0;
    will-change: left, top, transform;
}

.dl-flow-show__svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 860px;
    height: 360px;
    overflow: visible;
    pointer-events: none;
    z-index: 3;
}

.dl-flow-show__edge {
    fill: none;
    stroke-linecap: round;
    animation: dl-flow-dash 1.1s linear infinite;
}

.dl-flow-show__edge.is-active {
    filter: drop-shadow(0 0 6px rgba(79, 240, 127, .45));
}

@keyframes dl-flow-dash {
    to { stroke-dashoffset: -30; }
}

.dl-flow-show__node {
    position: absolute;
    z-index: 4;
    width: 210px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(15, 23, 42, .92);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    overflow: visible;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.dl-flow-show__port {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #94a3b8;
    z-index: 3;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, .35);
}

.dl-flow-show__port--in {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    background: #cbd5e1;
}

.dl-flow-show__port--out {
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    background: #22c55e;
}

.dl-flow-show__port--out-top {
    top: 32%;
}

.dl-flow-show__port--out-bottom {
    top: 68%;
}

.dl-flow-show__node.is-active .dl-flow-show__port--out,
.dl-flow-show__node.is-active .dl-flow-show__port--out-top,
.dl-flow-show__node.is-active .dl-flow-show__port--out-bottom {
    background: #4ff07f;
}

.dl-flow-show__node:hover,
.dl-flow-show__node.is-active {
    border-color: rgba(79, 240, 127, .45);
    box-shadow: 0 14px 34px rgba(79, 240, 127, .16);
}

.dl-flow-show__node-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .7rem;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.dl-flow-show__node-icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: .45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #04120a;
    font-size: .95rem;
    font-weight: 800;
}

.dl-flow-show__node-icon--green { background: #4ff07f; }
.dl-flow-show__node-icon--amber { background: #fbbf24; }
.dl-flow-show__node-icon--sky { background: #38bdf8; }
.dl-flow-show__node-icon--rose { background: #fb7185; }

.dl-flow-show__node-title {
    font-size: .8rem;
    font-weight: 800;
    color: #f8fafc;
}

.dl-flow-show__node-body {
    padding: .65rem .75rem .8rem;
    font-size: .75rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, .78);
}

.dl-flow-show__chip {
    display: inline-flex;
    margin-top: .45rem;
    margin-inline-end: .3rem;
    padding: .22rem .5rem;
    border-radius: .45rem;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    font-size: .68rem;
    font-weight: 700;
    color: rgba(226, 232, 240, .9);
}

.dl-flow-show__hint {
    position: absolute;
    inset-inline-start: .85rem;
    bottom: .85rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .7rem;
    border-radius: .7rem;
    background: rgba(2, 6, 23, .78);
    border: 1px solid rgba(255, 255, 255, .1);
    color: rgba(226, 232, 240, .88);
    font-size: .72rem;
    font-weight: 700;
    pointer-events: none;
}

.dl-flow-show__cta {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

@media (max-width: 767px) {
    .dl-flow-show__canvas-wrap {
        height: 340px;
    }

    .dl-flow-show__node {
        width: 170px;
    }
}
