/* Process Timeline Styles */
:root {
    --dilytics-accent: #0ea5e9;
    --dilytics-dark: #253E5C;
    /* --dilytics-gray: #64748b; */
    --dilytics-line-color: #d1d5db;
}

.dilytics-timeline-wrapper {
    width: 100%;
    overflow: visible;
}

/* Hide scrollbars for all browsers */
.dilytics-timeline-wrapper::-webkit-scrollbar {
    display: none;
}

.dilytics-timeline-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 2px;
    background-color: var(--dilytics-dark);
    margin: 180px auto;
}

/* Axis End Dots */
.dilytics-timeline-container::before,
.dilytics-timeline-container::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background-color: var(--dilytics-dark);
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.dilytics-timeline-container::before { left: 0; }
.dilytics-timeline-container::after { right: 0; }

.dilytics-timeline-items {
    display: flex;
    justify-content: flex-start;
    position: absolute;
    top: 0;
    left: 80px; /* Gap at the start */
    right: 80px; /* Gap at the end */
    height: 0;
}

.dilytics-timeline-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
}

/* Central Node */
.dilytics-timeline-node {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border: 2px solid var(--dilytics-dark);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 20; /* High z-index to stay above everything */
}

/* Vertical Connector Line */
.dilytics-timeline-connector {
    position: absolute;
    width: 2px;
    background-color: var(--dilytics-dark);
    left: 0;
    transform: translateX(-50%);
    z-index: 15;
    height: 108px !important;
}

.item-odd .dilytics-timeline-connector {
    bottom: 0;
    height: 50px;
}

.item-even .dilytics-timeline-connector {
    top: 0;
    height: 50px;
}

/* Content Box - SPANNING TWO SEGMENTS */
.dilytics-timeline-content {
    position: absolute;
    left: 0;
    width: 200%;
    padding: 10px 32px;
    background: transparent;
    transition: all 0.3s ease;
    text-align: left;
    z-index: 10;
    box-sizing: border-box;
}

/* Last items handling - Stopping slightly after the node but before the dot */
.dilytics-timeline-item:nth-last-child(2) .dilytics-timeline-content {
    width: calc(200% + 65px); /* Spans to the end dot */
}

.dilytics-timeline-item:nth-last-child(1) .dilytics-timeline-content {
    width: calc(100% + 65px); /* Spans to the end dot */
}

.item-odd .dilytics-timeline-content {
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding-top: 0px !important;
    justify-content: center;
}

.item-even .dilytics-timeline-content {
    top: 0px;
    display: flex;
    flex-direction: column;
    padding-bottom: 0px !important;
    justify-content: end;
}

.dilytics-timeline-step {
    margin-bottom: 2px;
    display: block;
}

.dilytics-timeline-title {
    margin: 0;
}

/* Blinking Animation */
@keyframes dilytics-blink {
    0% { border-color: var(--dilytics-dark); }
    50% { border-color: var(--dilytics-accent); }
    100% { border-color: var(--dilytics-dark); }
}

/* Active & Hover State Styling */
.dilytics-timeline-item.is-active .dilytics-timeline-content,
.dilytics-timeline-item:hover .dilytics-timeline-content {
    border-left: 2px solid var(--dilytics-dark);
}

.dilytics-timeline-item.item-odd.is-active .dilytics-timeline-content,
.dilytics-timeline-item.item-odd:hover .dilytics-timeline-content {
    background: linear-gradient(to top, rgba(14, 165, 233, 0.45) 0%, rgba(14, 165, 233, 0.1) 70%, transparent 100%);
    border-left: 0px !important;
}

.dilytics-timeline-item.item-even.is-active .dilytics-timeline-content,
.dilytics-timeline-item.item-even:hover .dilytics-timeline-content {
    background: linear-gradient(to bottom, rgba(14, 165, 233, 0.45) 0%, rgba(14, 165, 233, 0.1) 70%, transparent 100%);
    border-left: 0px !important;
}

/* Responsive - Horizontal Scrollable on Mobile */
@media (max-width: 1024px) {
    .dilytics-timeline-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; /* Hide scrollbar */
    }

    .dilytics-timeline-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .dilytics-timeline-container {
        min-width: 1000px; /* Force minimum width to enable scrolling */
        margin: 150px 0;
    }
    
    .dilytics-timeline-items {
        left: 50px;
        right: 50px;
    }

    .dilytics-timeline-item {
        scroll-snap-align: center;
    }
    
    .dilytics-timeline-content {
        padding: 10px;
    }

    .dilytics-timeline-title {
        font-size: 14px;
        max-width: 200px;
    }

    /* Fix widths for last items on mobile to match 50px gap */
    .dilytics-timeline-item:nth-last-child(2) .dilytics-timeline-content {
        width: calc(200% + 35px);
    }
    .dilytics-timeline-item:nth-last-child(1) .dilytics-timeline-content {
        width: calc(100% + 35px);
    }
}
