/* Front CSS for TW Pipeline - Modernized Layout */

/* Container & Variables */
.vb-pipeline-container {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: inherit;

    /* Default Variables (overridden by settings) */
    --vb-primary: #40bba4;
    --vb-grey: #e1e4e8;
    --vb-text-contrast: #ffffff;

    --vb-gap: 8px;
    /* Increased gap for better definition */
    --vb-height: 52px;
    /* Taller touch targets */
    --vb-radius: 26px;
    /* High radius for rounded/pill look */
    --vb-transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    --vb-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --vb-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Layout Grid */
.vb-pipeline-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    /* Slightly rounder container */
    box-shadow: var(--vb-shadow);
}

/* Column 1: Title */
.vb-pipeline-col-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Left align title */
}

.vb-pipeline-heading {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 0.5em;
    flex-wrap: wrap;
}

.vb-pipeline-subtitle {
    font-size: 0.8em;
    font-weight: 500;
    color: #6b7280;
}

/* Column 2: Steps */
.vb-pipeline-col-steps {
    min-width: 0;
    /* Prevent grid blowout */
}

/* Timeline Flex Wrapper */
.vb-pipeline-timeline {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0;
    /* Gap handled by margin-right on items due to clip-path overlap needs */
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Individual Step */
.vb-pipeline-step {
    position: relative;
    height: var(--vb-height);
    line-height: var(--vb-height);
    padding: 0 20px 0 35px;
    /* Left padding for chevron inlet */
    background: var(--vb-grey);
    color: #fff;
    /* Placeholder */
    font-weight: 600;
    font-size: 0.95rem;
    margin-right: var(--vb-gap);
    margin-bottom: 0;

    /* Chevron Shape */
    clip-path: polygon(0% 0%, calc(100% - 15px) 0%, 100% 50%, calc(100% - 15px) 100%, 0% 100%, 15px 50%);

    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--vb-transition);
    cursor: default;
    user-select: none;
    will-change: transform, box-shadow;

    min-width: 60px;
}

/* First item: flat left */
.vb-pipeline-step:first-child {
    clip-path: polygon(0% 0%, calc(100% - 15px) 0%, 100% 50%, calc(100% - 15px) 100%, 0% 100%);
    padding-left: 20px;
    border-top-left-radius: var(--vb-radius);
    border-bottom-left-radius: var(--vb-radius);
}

/* Done Status */
.vb-pipeline-step.is-done {
    background: var(--vb-primary);
    color: var(--vb-text-contrast);
    padding-right: 30px;
    padding-left: 40px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.vb-pipeline-step.is-done .vb-step-content::before {
    content: '\2713';
    /* Checkmark */
    display: inline-block;
    margin-right: 6px;
    font-weight: 800;
}

.vb-pipeline-step.is-done:first-child {
    padding-left: 25px;
}

/* Todo Status (Inactive) */
.vb-pipeline-step.is-todo {
    background: var(--vb-grey);
    color: #555;
    /* Visible text */
    padding-right: 30px;
    padding-left: 40px;
    flex-grow: 0;
    cursor: default;
    /* No clipped width */
}

.vb-pipeline-step.is-todo:first-child {
    padding-left: 25px;
}

/* Interactions */
.vb-pipeline-step.is-todo:hover,
.vb-pipeline-step.is-todo:focus {
    background: #d1d5da;
    transform: translateY(-2px);
    z-index: 5;
    color: #333;
}

/* Tooltips removed as text is now visible */

/* Responsive Handling - Vertical Line on Mobile */
@media (max-width: 900px) {
    .vb-pipeline-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .vb-pipeline-col-title {
        justify-content: center;
        text-align: center;
    }

    .vb-pipeline-heading {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .vb-pipeline-timeline {
        flex-direction: column;
        gap: 10px;
    }

    .vb-pipeline-step,
    .vb-pipeline-step:first-child {
        width: 100%;
        margin-right: 0;
        clip-path: none !important;
        /* Remove chevron shape */
        border-radius: 8px;
        /* Simple rounded card */
        padding-left: 20px !important;
        padding-right: 20px !important;
        justify-content: flex-start;
        height: auto;
        min-height: 44px;
        line-height: normal;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .vb-pipeline-step.is-done {
        /* Add a checkmark or indicator if desired, or just color */
        border-left: 5px solid rgba(0, 0, 0, 0.1);
    }
}

/* Screen Reader */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}