/* =============================================
   EB Global Process Flow Widget
   Inspired by Cosmax OBM pipeline design
   ============================================= */

.eb-pf-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 80px;
    overflow: hidden;
}

/* ----- Steps Row ----- */
.eb-pf-steps {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.eb-pf-step {
    position: relative;
    flex-shrink: 0;
}

.eb-pf-step + .eb-pf-step {
    margin-left: -20px;
}

/* ----- Circle ----- */
/* ----- Circle ----- */
.eb-pf-circle {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eb-pf-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #2a2a2a;
    border-radius: 50%;
    box-sizing: border-box;
}

/* Inner rings for double/triple styles */
.eb-pf-ring-inner {
    top: 8%;
    left: 8%;
    width: 84%;
    height: 84%;
    border-color: #b0b0b0;
}

.eb-pf-ring-inner-2 {
    top: 4%;
    left: 4%;
    width: 92%;
    height: 92%;
    border-color: #b0b0b0;
}

/* ----- Label inside circle ----- */
.eb-pf-label {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 400;
    color: #2a2a2a;
    text-align: center;
    line-height: 1.3;
    padding: 0 10px;
}

/* ----- Connector Line ----- */
.eb-pf-connector {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

.eb-pf-connector-line {
    position: absolute;
    height: 1px;
    background-color: #2a2a2a;
    top: 60px;
    left: 0;
    right: 0;
}

.eb-pf-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #1a1a1a;
    border-radius: 50%;
    top: 60px;
    transform: translate(-50%, -50%);
}

/* ----- Badges (Start / End) ----- */
.eb-pf-badge {
    position: absolute;
    z-index: 4;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.eb-pf-badge--start {
    background-color: #1a1a1a;
    color: #ffffff;
    top: -27px;
    left: 50%;
    transform: translateX(-50%);
}

.eb-pf-badge--end {
    background-color: #d4cfc5;
    color: #2a2a2a;
    top: -27px;
    left: 50%;
    transform: translateX(-50%);
}

/* =============================================
   ANIMATION: Initial hidden states
   Everything starts invisible, JS adds classes
   ============================================= */

/* Phase 1: Circles start hidden */
.eb-pf-step {
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Inner rings start hidden (phase 3) */
.eb-pf-ring-inner,
.eb-pf-ring-inner-2 {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease 0s, transform 0.4s ease 0s;
    transform-origin: center center;
}

/* Connector line + dots start hidden (phase 2) */
.eb-pf-connector-line {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.eb-pf-dot {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Badges start hidden */
.eb-pf-badge--start {
    opacity: 0;
    transform: translateX(-50%) scale(0);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.eb-pf-badge--end {
    opacity: 0;
    transform: translateX(-50%) scale(0);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Labels inside circles fade in slightly after circle */
.eb-pf-label {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* =============================================
   ANIMATION: Visible / active states
   ============================================= */

/* Phase 1: Each circle pops in */
.eb-pf-step.eb-pf-visible {
    opacity: 1;
    transform: scale(1);
}

.eb-pf-step.eb-pf-visible .eb-pf-label {
    opacity: 1;
}

/* Phase 2: Line draws in, dots pop, start badge appears */
.eb-pf-connector-line.eb-pf-visible {
    opacity: 1;
    transform: scaleX(1);
}

.eb-pf-dot.eb-pf-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.eb-pf-badge--start.eb-pf-visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Phase 3: Inner rings appear, end badge pops */
.eb-pf-ring-inner.eb-pf-visible,
.eb-pf-ring-inner-2.eb-pf-visible {
    opacity: 1;
    transform: scale(1);
}

.eb-pf-badge--end.eb-pf-visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ----- Hover effect on steps ----- */
.eb-pf-step.eb-pf-visible {
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.eb-pf-step.eb-pf-visible:hover {
    transform: scale(1.05);
    z-index: 5;
}

.eb-pf-step.eb-pf-visible:hover .eb-pf-ring {
    border-color: #555;
    transition: border-color 0.3s ease;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .eb-pf-wrapper {
        padding: 50px 20px 70px;
    }

    .eb-pf-circle {
        width: 120px !important;
        height: 120px !important;
    }

    .eb-pf-label {
        font-size: 12px;
    }

    .eb-pf-step + .eb-pf-step {
        margin-left: -15px !important;
    }

    .eb-pf-badge {
        width: 45px !important;
        height: 45px !important;
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .eb-pf-wrapper {
        padding: 40px 10px 60px;
        justify-content: flex-start;
    }

    .eb-pf-circle {
        width: 100px !important;
        height: 100px !important;
    }

    .eb-pf-label {
        font-size: 10px;
    }

    .eb-pf-step + .eb-pf-step {
        margin-left: -10px !important;
    }

    .eb-pf-badge {
        width: 38px !important;
        height: 38px !important;
        font-size: 9px;
    }

    .eb-pf-dot {
        width: 7px !important;
        height: 7px !important;
    }
}

@media (max-width: 480px) {
    .eb-pf-circle {
        width: 75px !important;
        height: 75px !important;
    }

    .eb-pf-label {
        font-size: 9px;
        padding: 0 4px;
    }

    .eb-pf-step + .eb-pf-step {
        margin-left: -8px !important;
    }
}
