/**
 * Roadmap-styled Elementor Nested Tabs.
 *
 * Usage: set the Nested Tabs widget's CSS ID (Advanced -> CSS ID) to
 * `roadmap-tabs`, then load this CSS (theme enqueue, or paste into
 * Elementor > Custom CSS / a Custom Code block).
 *
 * The "line fills up to the active dot" effect is pure CSS: every tab that
 * sits BEFORE the active one is matched with `:has(~ [aria-selected="true"])`.
 */

:root {
    --hf-roadmap-brand: #1b8597;
    --hf-roadmap-halo: rgba(27, 133, 151, 0.25);
    --hf-roadmap-line: #d4dde0;
    --hf-roadmap-dot-empty: #ffffff;
    --hf-roadmap-dot-border: #c2cdd1;
    --hf-roadmap-dot-size: 18px;
}

/* ---- Heading: lay the tabs out as an evenly spaced timeline ---- */
#roadmap-tabs .e-n-tabs-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0;
    border: none;
    box-shadow: none;
}

/* ---- Each tab title = a label with a dot + connector line above it ---- */
#roadmap-tabs .e-n-tab-title {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 52px 8px 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    text-align: center;
    cursor: pointer;
}

/* Kill Elementor's default active underline / bottom indicator */
#roadmap-tabs .e-n-tab-title::selection { background: transparent; }
#roadmap-tabs .e-n-tab-title[aria-selected="true"] {
    border: none;
    box-shadow: none;
}

#roadmap-tabs .e-n-tab-title-text {
    display: block;
    line-height: 1.3;
    color: #44515a;
    transition: color 0.2s ease;
}

#roadmap-tabs .e-n-tab-title[aria-selected="true"] .e-n-tab-title-text {
    color: #1f2a30;
    font-weight: 600;
}

/* ---- The connector line (drawn from this dot back to the previous dot) ---- */
#roadmap-tabs .e-n-tab-title::before {
    content: "";
    position: absolute;
    top: 25px; /* dot vertical centre: padding-top zone */
    right: 50%;
    width: 100%;
    height: 3px;
    transform: translateY(-50%);
    background: var(--hf-roadmap-line);
    z-index: 1;
    transition: background 0.25s ease;
}

/* First tab has no dot to its left -> no line segment */
#roadmap-tabs .e-n-tab-title:first-child::before {
    display: none;
}

/* Brand line into the active dot and into every completed (earlier) dot */
#roadmap-tabs .e-n-tab-title[aria-selected="true"]::before,
#roadmap-tabs .e-n-tab-title:has(~ .e-n-tab-title[aria-selected="true"])::before {
    background: var(--hf-roadmap-brand);
}

/* ---- The dot ---- */
#roadmap-tabs .e-n-tab-title::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 50%;
    width: var(--hf-roadmap-dot-size);
    height: var(--hf-roadmap-dot-size);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--hf-roadmap-dot-empty);
    border: 2px solid var(--hf-roadmap-dot-border);
    box-sizing: border-box;
    z-index: 2; /* sits above the line */
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Completed (earlier) dots: solid brand fill, no halo */
#roadmap-tabs .e-n-tab-title:has(~ .e-n-tab-title[aria-selected="true"])::after {
    background: var(--hf-roadmap-brand);
    border-color: var(--hf-roadmap-brand);
}

/* Active dot: brand fill + outline halo */
#roadmap-tabs .e-n-tab-title[aria-selected="true"]::after {
    background: var(--hf-roadmap-brand);
    border-color: var(--hf-roadmap-brand);
    box-shadow: 0 0 0 5px var(--hf-roadmap-halo);
}

/* Hover (any tab): brand fill + outline halo */
#roadmap-tabs .e-n-tab-title:hover::after,
#roadmap-tabs .e-n-tab-title:focus-visible::after {
    background: var(--hf-roadmap-brand);
    border-color: var(--hf-roadmap-brand);
    box-shadow: 0 0 0 5px var(--hf-roadmap-halo);
}