.root {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('./assets/bg.jpg') center/cover no-repeat;
}

.container {
    display: flex;
    position: relative;
    justify-content: flex-start;
    width: 100%;
    height: 900px;
    max-width: var(--content-max-width);
}

.leftContent {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 258px;
    left: 120px;
    max-width: 420px;
    height: 384px;
}

.description {
    margin-top: 16px;
    color: var(--color-text-primary-inverted);
}

.buttonWrap {
    margin-top: 32px;
    width: fit-content;
}

.textContainer {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 292px;
    width: 240px;
    right: 540px;
    gap: 4px;
    z-index: 2;
}

.pillContainer {
    position: absolute;
    width: 480px;
    height: 640px;
    top: 140px;
    right: 180px;
}

.pillImage {
    transition: opacity 0.3s ease;
    position: absolute;
    width: 480px;
    height: 640px;
    border-radius: var(--border-radius-full);
    object-fit: contain;
}

.pillImage.active {
    opacity: 1;
    z-index: 2;
    animation: wipeReveal 0.8s ease-in-out forwards;
}

.pillImage.exiting {
    z-index: 1;
}

@keyframes wipeReveal {
    0% {
        clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes containerLoad {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.protocolContainer,
.pillContainer {
    animation: containerLoad 500ms 600ms both;
}

.dosageContainer {
    animation: containerLoad 500ms 700ms both;
}

.goalContainer {
    animation: containerLoad 500ms 800ms both;
}

.svgContainer {
    animation: containerLoad 500ms 900ms both;
}

.protocolContainer,
.dosageContainer,
.goalContainer,
.svgContainer {
    border-radius: var(--border-radius-sm);
    border: 0.5px solid var(--border-color-alpha-white-10);
    background:
        linear-gradient(0deg, var(--color-bg-fill-alpha-white-10) 0%, var(--color-bg-fill-alpha-white-10) 100%),
        var(--color-bg-fill-alpha-black-40);
    backdrop-filter: blur(25px);
}

.protocolContainer,
.dosageContainer,
.goalContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.svgContainer {
    width: 100%;
    height: 129px;
}

.dosageContainer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.dosageTextBlock {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dosageItem {
    width: 60px;
    height: 60px;
}

.protocolText,
.dosageText,
.goalText {
    color: var(--color-text-primary-inverted);
}

.protocolValue,
.dosageValue,
.goalValue {
    color: var(--color-text-primary-brand-solar);
}

.protocolFade,
.dosageImageFade,
.dosageTextFade,
.dosageValueFade,
.goalFade,
.svgFade {
    transition: opacity 0.2s ease;
}

.protocolFade {
    transition-delay: 0ms;
}
.dosageImageFade,
.dosageTextFade,
.dosageValueFade {
    transition-delay: 50ms;
}
.goalFade {
    transition-delay: 100ms;
}
.svgFade {
    transition-delay: 110ms;
}

.fadeOut {
    opacity: 0;
}
.fadeIn {
    opacity: 1;
}

.mobile {
    display: none;
}

.desktop {
    display: block;
}

@media screen and (width <= 1300px) {
    .container {
        position: relative;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
    }

    .leftContent {
        position: absolute;
        top: 112px;
        left: 50%;
        transform: translateX(-50%);
        min-width: 335px;
        height: 327px;
    }

    .description {
        margin-top: 16px;
    }

    .buttonWrap {
        margin-top: 24px;
        width: fit-content;
    }

    .textContainer {
        position: absolute;
        top: 515px;
        right: 50%;
        gap: 2.5px;
    }

    .pillContainer {
        position: absolute;
        top: 507px;
        right: calc(50% - 209px);
        width: 257px;
        height: 342px;
    }

    .pillImage {
        width: 257px;
        height: 342px;
    }
}

@media screen and (width <= 768px) {
    .container {
        height: 890px;
    }

    .leftContent {
        width: 100%;
        max-width: none;
        padding-left: 20px;
        padding-right: 20px;
    }

    .textContainer {
        top: 545px;
        width: 166px;
        gap: 2.5px;
    }

    .pillContainer {
        position: absolute;
        top: 487px;
        right: calc(50% - 169px);
        width: 257px;
        height: 342px;
    }

    .svg {
        width: 100%;
        height: auto;
    }

    .svgContainer {
        height: 90px;
    }

    .dosageItem {
        width: 37.5px;
        height: 37.5px;
    }

    .protocolContainer,
    .dosageContainer,
    .goalContainer {
        padding: 10px;
    }

    .goalValue {
        letter-spacing: 0.3px;
    }

    .mobile {
        display: block;
    }

    .desktop {
        display: none;
    }
}
