/**
 * Angie Progression Chart Widget Styles
 */

.angie-progression-chart {
    display: flex;
    width: 100%;
    position: relative;
}

/* Horizontal Layout (Default) */
.angie-progression-chart--horizontal {
    flex-direction: row;
    align-items: flex-start;
}

.angie-progression-chart--horizontal .angie-progression-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
}

.angie-progression-chart--horizontal .angie-progression-step__graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.angie-progression-chart--horizontal .angie-progression-step__connector {
    position: absolute;
    top: 50%;
    right: 50%;
    width: 100%; /* Spans to the previous item */
    height: 2px;
    transform: translateY(-50%);
    z-index: 0;
}

/* Fix connector positioning for horizontal layout */
.angie-progression-chart--horizontal .angie-progression-step:first-child .angie-progression-step__connector {
    display: none;
}

/* Vertical Layout */
.angie-progression-chart--vertical {
    flex-direction: column;
}

.angie-progression-chart--vertical .angie-progression-step {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    position: relative;
    padding-bottom: 20px;
}

.angie-progression-chart--vertical .angie-progression-step:last-child {
    padding-bottom: 0;
}

.angie-progression-chart--vertical .angie-progression-step__graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
    position: relative;
    height: 100%;
}

.angie-progression-chart--vertical .angie-progression-step__connector {
    position: absolute;
    top: 0; /* Start from top of current item */
    left: 50%;
    width: 2px;
    height: 100%; /* Height needs calculation or absolute positioning trick */
    height: calc(100% + 20px); /* Extend to next item approximately */
    transform: translateX(-50%) translateY(-100%); /* Move up to connect from previous */
    z-index: 0;
}

/* Common Styles */
.angie-progression-step__indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1;
    /* Default sizing handled by controls */
    background-color: #eee; /* Fallback */
    transition: all 0.3s ease;
}

.angie-progression-step__title {
    margin: 0 0 5px;
    font-weight: 600;
}

.angie-progression-step__description {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .angie-progression-chart--horizontal {
        flex-direction: column;
    }
    
    .angie-progression-chart--horizontal .angie-progression-step {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        margin-bottom: 20px;
        width: 100%;
    }

    .angie-progression-chart--horizontal .angie-progression-step__graphic {
        width: auto;
        margin-bottom: 0;
        margin-right: 15px;
        flex-direction: column;
    }

    /* Convert horizontal connectors to vertical style on mobile */
    .angie-progression-chart--horizontal .angie-progression-step__connector {
        width: 2px;
        height: 100%;
        top: 0;
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-100%);
        height: calc(100% + 20px); 
    }
}
