.lifecycle-widget {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 4em auto;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lifecycle-widget__lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

.lifecycle-widget__lines path {
    fill: none;
    stroke: #003366;
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    stroke-linejoin: round;
    stroke-linecap: round;
    animation: drawLine 1.5s ease-out forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.lifecycle-widget__center {
    position: relative;
    width: 80%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.lifecycle-widget__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.lifecycle-widget__center-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.lifecycle-widget__point {
    position: absolute;
    z-index: 3;
    width: 400px !important;
    height: auto;
    display: none;
    /* Hide points by default */
}

/* 8-Point Dynamic Positioning */
.position--top-left {
    top: 5%;
    left: 0;
    transform: translate(-100%, 0);
    text-align: right;
}

.position--top-center {
    top: 0;
    left: 50%;
    transform: translate(-50%, -120%);
    text-align: center;
}

.position--top-right {
    top: 5%;
    right: 0;
    transform: translate(100%, 0);
    text-align: left;
}

.position--center-right {
    top: 50%;
    right: 0;
    transform: translate(110%, -50%);
    text-align: left;
}

.position--bottom-right {
    bottom: 5%;
    right: 0;
    transform: translate(100%, 0);
    text-align: left;
}

.position--bottom-center {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 120%);
    text-align: center;
}

.position--bottom-left {
    bottom: 5%;
    left: 0;
    transform: translate(-100%, 0);
    text-align: right;
}

.position--center-left {
    top: 50%;
    left: 0;
    transform: translate(-110%, -50%);
    text-align: right;
}

/* Enforce white text on the center button */
.lifecycle-widget__button { color: #ffffff !important; }
.lifecycle-widget__button:hover,
.lifecycle-widget__button:focus { color: #ffffff !important; }

/* RESPONSIVE STYLES */
@media (max-width: 767px) {
    .lifecycle-widget {
        position: static;
        width: 100%;
        max-width: none;
        margin: 2em auto;
        aspect-ratio: auto;
        flex-direction: column;
    }
    
    .lifecycle-widget__lines {
        display: none;
    }

    .lifecycle-widget__center {
        width: 100%;
        height: auto;
        min-height: 250px;
        margin-bottom: 30px;
    }

    .lifecycle-widget__image {
        width: 80%;
        height: auto;
        max-width: 300px;
    }

    .lifecycle-widget__point {
        position: static;
        transform: none !important;
        width: 100%;
        max-width: 400px;
        margin: 15px auto;
        text-align: left !important;
        display: block !important;
    }
}