/*
 * bip-participant-journey.css
 * Participant-specific styles for the stepped participant journey
 * rendered by [bip_assessment] in team/pairwise modes.
 *
 * SHARED journey shell (strip, step header, content blocks, form
 * fields, nav bar) now lives in bip-assessment.css — consolidated
 * Mar 2026 to eliminate duplication.
 *
 * Depends on: bip-assessment.css (tokens + shared journey shell),
 *             bip-hub.css (buttons).
 */

/* ═══════════════════════════════════════════════════════════════
   PARTICIPANT JOURNEY — overrides and additions
   ═══════════════════════════════════════════════════════════════ */

/* ── Team info box (welcome step) ────────────────────────────── */

.bip-pj-team-info {
    padding: 0;
    margin-bottom: 28px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 24px;
}

.bip-pj-team-info__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
}

.bip-pj-team-info__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bip-pj-team-info__label {
    font-family: var(--bip-font-heading);
    font-size: var(--bip-text-sm);
    letter-spacing: var(--bip-tracking-wide);
    text-transform: uppercase;
    color: #000;
}

.bip-pj-team-info__value {
    font-family: var(--bip-font-body);
    font-size: var(--bip-text-base);
    color: #333;
    line-height: 1.3;
}

/* .bip-pj-section-kicker — styled by unified kicker rule via .bip-journey__step-kicker sibling class */

.bip-pj-code-entry {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

@media (max-width: 480px) {
    .bip-pj-team-info__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Reduce step header gap — base has 36px, too much for this compact journey */
.bip-participant-journey .bip-journey__step-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.bip-participant-journey { width: 100%; }

/* ── Results step: full-width layout ─────────────────────────────────────
   When the results step is active, break out of the 680px body cap so the
   charts and result blocks have the full page width — matching the experience
   of the standalone team-results / token views.
   The :has() selector is supported in all modern browsers; older browsers
   simply ignore it and keep the narrower layout (graceful degradation).
   ─────────────────────────────────────────────────────────────────────── */
.bip-participant-journey:has(.bip-journey__step[data-type="results"].is-active) .bip-journey__body {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Strip the step-header left padding that relies on the ghost number for
   visual rhythm — not needed at full width where results speak for themselves */
.bip-participant-journey:has(.bip-journey__step[data-type="results"].is-active) .bip-journey__step[data-type="results"] .bip-journey__step-header {
    padding-left: 24px;
    padding-right: 24px;
}

/* Nav variants */
.bip-participant-journey .bip-journey__nav--noborder {
    border-top: none !important;
    padding-top: 4px;
    margin-top: 12px;
}
.bip-participant-journey .bip-journey__nav--centre {
    justify-content: center;
    gap: 16px;
}

/* Compact, consistent buttons */
.bip-participant-journey .bip-journey__nav .bip-hub-btn {
    font-size: 1rem !important;
    padding: 0.4em 2em !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Welcome fields */
.bip-participant-journey .bip-pj-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 4px;
    margin-bottom: 4px;
}
.bip-participant-journey .bip-journey__input.bip-field-error {
    border-bottom-color: #c8401a !important;
}

/* Setup — issue field */
.bip-participant-journey .bip-setup-issue-wrap {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    text-align: center !important;
}
.bip-participant-journey .bip-setup-issue-label {
    text-align: center;
}
.bip-participant-journey .bip-setup-issue-input {
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
}

/* Setup — items list */
.bip-participant-journey ol.bip-pairwise-items-list {
    list-style: none;
    padding-left: 0;
    margin: 8px 0 0;
}
.bip-participant-journey .bip-setup-required { color: #c8401a; margin-left: 2px; }

/* Add-row flush under last item */
.bip-participant-journey .bip-setup-add-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0; margin: 0; border: none;
}
.bip-participant-journey .bip-setup-add-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    font-family: var(--bip-font-body);
    font-size: var(--bip-text-base);
    color: #444;
    padding: 8px 0 8px 14px;
    cursor: pointer;
    transition: color 0.15s;
    text-align: left;
    letter-spacing: var(--bip-tracking);
}
.bip-participant-journey .bip-setup-add-item-btn:hover { color: #000; }
.bip-participant-journey .bip-setup-add-item-btn::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border: 1.5px solid #999;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.bip-participant-journey .bip-setup-add-item-btn:hover::before { border-color: #000; }

.bip-participant-journey .bip-pair-count {
    font-family: var(--bip-font-body);
    font-size: var(--bip-text-sm);
    color: #555;
    letter-spacing: var(--bip-tracking);
    white-space: nowrap;
    text-align: right;
}

/* Tighter paragraph spacing inside body / content text */
.bip-participant-journey .bip-journey__content-text p {
    margin: 0 0 0.6em 0 !important;
    padding: 0 !important;
}
.bip-participant-journey .bip-journey__content-text p:last-child {
    margin-bottom: 0 !important;
}

/* Confirm step */
.bip-pj-confirm-items { margin-bottom: 8px; }
.bip-pj-confirm-list  { list-style: none; padding-left: 0; margin: 0 0 8px; }
.bip-pj-confirm-count {
    font-family: var(--bip-font-body);
    font-size: var(--bip-text-sm); color: #555;
    text-align: right; margin: 4px 0 0;
}

/* Survey JS mount */
.bip-participant-journey .bip-pj-js-mount { min-height: 120px; width: 100%; }

/* Reduce gap above pairwise prompt */
.bip-participant-journey .bip-journey__step-body { margin-bottom: 0; }
.bip-participant-journey .bip-pairwise-question-wrap { padding-top: 8px; }

/* Card entrance — split left / right */
@keyframes bip-pw-slide-in-left {
    from { transform: translateX(-28px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
@keyframes bip-pw-slide-in-right {
    from { transform: translateX(28px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.bip-participant-journey .bip-pairwise-slide-panel--entering { animation: none !important; }
.bip-participant-journey .bip-pairwise-slide-panel--entering .bip-pairwise-card:first-child {
    animation: bip-pw-slide-in-left  0.5s cubic-bezier(0.25,0.46,0.45,0.94) both;
}
.bip-participant-journey .bip-pairwise-slide-panel--entering .bip-pairwise-card:last-child {
    animation: bip-pw-slide-in-right 0.5s cubic-bezier(0.25,0.46,0.45,0.94) both;
}

/* Back/Finish buttons on comparison screen */
.bip-participant-journey .bip-question-input-row--pairwise {
    justify-content: center;
    gap: 16px;
    align-items: center;
}
.bip-participant-journey .bip-question-input-row--pairwise .bip-button-back,
.bip-participant-journey .bip-question-input-row--pairwise .bip-button-next {
    min-width: 120px;
    text-align: center;
    font-size: 14px !important;
}

/* Responsive */
@media (max-width: 640px) {
    .bip-participant-journey .bip-pj-fields { gap: 16px; }
    .bip-participant-journey .bip-journey__nav--centre { gap: 10px; }
    .bip-participant-journey .bip-journey__nav .bip-hub-btn {
        font-size: 0.95rem !important;
        padding: 0.4em 1.4em !important;
    }
}
/* ── Data collection notice (M3 — GDPR) ─────────────────────────────────── */
.bip-data-collection-notice {
    margin-top: 24px;
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--bip-muted, #888);
    border-top: 1px solid var(--bip-faint, #eee);
    text-align: center;
}
.bip-data-collection-notice a {
    color: inherit;
    text-decoration: underline;
}
