/* Guided Path Rail — right-side onboarding spine. v1 single path, stage-aligned color. */

guided-path-rail {
    --gp-seed: var(--primary-green, #7FB069);
    --gp-rail-bg: #ffffff;
    --gp-text: #2d2d2d;
    --gp-muted: #6b6b6b;
    --gp-border: rgba(0, 0, 0, 0.08);
    --gp-clearing-tint: rgba(127, 176, 105, 0.10);

    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 900;
    display: block;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gp-text);
}

.guided-path-rail {
    background: var(--gp-rail-bg);
    border: 1px solid var(--gp-border);
    border-left: 4px solid var(--gp-seed);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: width 0.25s ease, max-height 0.25s ease;
}

.guided-path-rail.expanded {
    width: 320px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.guided-path-rail.collapsed {
    width: 56px;
}

.gp-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    color: var(--gp-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}

.gp-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Header */
.gp-header {
    padding: 16px 16px 12px 20px;
    border-bottom: 1px solid var(--gp-border);
}

.gp-path-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gp-text);
}

.gp-path-subtitle {
    font-size: 12px;
    color: var(--gp-muted);
    margin-top: 4px;
}

/* Stops list */
.gp-stops {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gp-stop {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gp-border);
    position: relative;
}

.gp-stop:last-child {
    border-bottom: none;
}

.gp-stop.clearing {
    background: var(--gp-clearing-tint);
}

.gp-stop-marker {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    color: var(--gp-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.gp-stop.status-complete .gp-stop-marker {
    background: var(--gp-seed);
    color: white;
}

.gp-stop.status-in_progress .gp-stop-marker {
    background: var(--gp-seed);
    color: white;
    box-shadow: 0 0 0 3px var(--gp-clearing-tint);
}

.gp-stop.clearing .gp-stop-marker {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 14px;
}

.gp-stop-body {
    flex: 1;
    min-width: 0;
}

.gp-stop-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-text);
    line-height: 1.3;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.gp-stop.clearing .gp-stop-label {
    font-size: 15px;
}

.gp-stop.status-complete .gp-stop-label {
    color: var(--gp-muted);
}

/* Strikethrough only crosses the label text — not the CLEARING badge */
.gp-stop.status-complete .gp-stop-label-text {
    text-decoration: line-through;
}

.gp-stop.status-complete .gp-clearing-badge {
    opacity: 0.6;
}

.gp-clearing-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gp-seed);
    background: white;
    border: 1px solid var(--gp-seed);
    padding: 1px 6px;
    border-radius: 8px;
}

.gp-stop-why {
    font-size: 12px;
    color: var(--gp-muted);
    line-height: 1.4;
    margin-top: 4px;
}

.gp-stop.status-complete .gp-stop-why {
    display: none;
}

.gp-stop-cta {
    margin-top: 8px;
    background: var(--gp-seed);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.gp-stop-cta:hover {
    filter: brightness(0.95);
}

/* Spine (collapsed) — vertical column of dots, one per stop. Clearings are
   larger; completed are filled; current is haloed; upcoming is outlined.
   The whole spine becomes a trail-marker glance rather than rotated text. */
.gp-spine {
    padding: 40px 0 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.gp-spine-dots {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
}

/* Subtle trail line behind the dots */
.gp-spine-dots::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 50%;
    width: 2px;
    background: var(--gp-border);
    transform: translateX(-50%);
    z-index: 0;
}

.gp-spine-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #d8d8d8;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    cursor: help;
    transition: transform 0.15s ease;
}

.gp-spine-dot.is-clearing {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.gp-spine-dot.status-complete {
    background: var(--gp-seed);
    border-color: var(--gp-seed);
}

.gp-spine-dot.status-in_progress {
    background: var(--gp-seed);
    border-color: var(--gp-seed);
    box-shadow: 0 0 0 4px var(--gp-clearing-tint);
}

.gp-spine-dot:hover {
    transform: scale(1.15);
}

.gp-spine-progress {
    font-size: 13px;
    font-weight: 700;
    color: var(--gp-seed);
    letter-spacing: 0.5px;
    padding-top: 4px;
    border-top: 1px solid var(--gp-border);
    width: 60%;
    text-align: center;
}

/* Responsive — fold the rail away on narrow screens so it doesn't overlap content */
@media (max-width: 1100px) {
    guided-path-rail {
        display: none;
    }
}
