/* ============================================
   WWAD Timeline Widget - Frontend Styles (SAFE)
   ============================================ */

.wwad-timeline-container {
    width: 100%;
    position: relative;
    overflow: visible !important;
}

/* Timeline Container */
.wwad-timeline {
    position: relative;
    min-height: 100px;

    /* Defaults (Elementor style controls can override colors) */
    --wwad-inactive-line-color: rgba(255, 255, 255, 0.18);
    --wwad-active-line-color: #00c5bc;

    /* ✅ IMPORTANT:
       Fallback so the inactive line NEVER disappears before JS runs.
       JS will override this with an exact px height after measurement. */
    --wwad-inactive-height: 100%;
}

/* ============================================
   INACTIVE (BACKGROUND) LINE
   ============================================ */
.wwad-timeline::before {
    content: "";
    position: absolute;
    width: 8px;
    top: 0;
    left: 40px;
    background-color: var(--wwad-inactive-line-color);
    border-radius: 4px;
    z-index: 1;

    /* Driven by CSS variable (fallback = 100%, JS sets px) */
    height: var(--wwad-inactive-height);

    pointer-events: none;
}

/* ============================================
   ACTIVE (GROWING) LINE
   ============================================ */
.wwad-timeline-progress {
    position: absolute;
    width: 8px;
    top: 0;
    left: 40px;
    background-color: var(--wwad-active-line-color);
    border-radius: 4px;
    z-index: 2;

    /* JS sets actual height in px */
    height: 0;

    transition: none;         /* CRITICAL: do not animate height */
    will-change: height;

    pointer-events: none;
}

/* ============================================
   STEPS
   ============================================ */
.wwad-steps {
    position: relative;
    z-index: 3;
}

.wwad-step {
    display: flex;
    margin-bottom: 60px;
}

.wwad-step:last-child {
    margin-bottom: 0 !important;
}

/* Content Box */
.wwad-content-box {
    width: 100%;
    margin-left: 90px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    text-align: left !important;
}

/* Step Header - UPDATED: Icon and title inline */
.wwad-step-header {
    margin-bottom: 16px;
    display: flex;
    align-items: center !important; /* Center vertically */
    gap: 16px; /* Space between icon and title */
}

.wwad-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 197, 188, 0.3);
    background-color: rgba(0, 197, 188, 0.12);
    margin-bottom: 0 !important; /* Remove bottom margin since they're inline */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.wwad-icon-wrapper i,
.wwad-icon-wrapper svg {
    font-size: 32px;
    color: #00c5bc;
}

.wwad-step-name {
    font-weight: 700;
    margin: 0; /* Remove bottom margin since description is separate */
    color: #00c5bc;
    font-size: 1.25rem; /* Adjust as needed */
}

.wwad-description {
    margin: 16px 0 0 0; /* Add top margin to separate from header */
    line-height: 1.6;
    color: #e0e0e0;
}

/* ============================================
   RESPONSIVE (IMPORTANT: NO HEIGHT OVERRIDES)
   ============================================ */

@media (max-width: 993px) {
    .wwad-step {
        margin-bottom: 40px;
    }
}

@media (max-width: 767px){
    .wwad-timeline::before,
    .wwad-timeline-progress {
        left: 0; /* Adjusted for smaller screens */
    }
    
    .wwad-content-box {
        margin-left: 30px !important; /* Adjusted for smaller screens */
    }
    
    /* Optional: Adjust icon size for mobile */
    .wwad-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .wwad-icon-wrapper i,
    .wwad-icon-wrapper svg {
        font-size: 24px;
    }
    
    /* Optional: Adjust gap for mobile */
    .wwad-step-header {
        gap: 12px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .wwad-timeline-progress {
        transition: none;
    }
}