/* =============================================================
   CPC GF Journey — Frontend Styles
   Progressive one-field-at-a-time Gravity Forms experience
   ============================================================= */

/* ── Progress Bar ──────────────────────────────────────────────── */

.cpc-gfj-progress {
    margin-bottom: 28px;
    padding: 0 2px;
}

.cpc-gfj-progress-track {
    position: relative;
    height: 5px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}

.cpc-gfj-progress-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(90deg, #f4580d, #ff8c42);
    border-radius: 99px;
    width: 0%;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.cpc-gfj-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.cpc-gfj-progress-label .cpc-gfj-step-text {
    color: #f4580d;
    font-weight: 600;
}

.cpc-gfj-progress-label .cpc-gfj-pct {
    font-size: 11px;
    color: #9ca3af;
}

/* ── Field States ──────────────────────────────────────────────── */

/* Hidden (not yet reached) */
.cpc-gfj-field-hidden {
    display: none !important;
}

/* Entering animation */
@keyframes cpc-gfj-slide-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active field */
.cpc-gfj-field-active {
    animation: cpc-gfj-slide-in 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.cpc-gfj-field-active input:not([type="radio"]):not([type="checkbox"]),
.cpc-gfj-field-active select,
.cpc-gfj-field-active textarea {
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Done field — green bordered, slightly muted */
.cpc-gfj-field-done {
    position: relative;
    cursor: default;
}

.cpc-gfj-field-done input:not([type="radio"]):not([type="checkbox"]),
.cpc-gfj-field-done select,
.cpc-gfj-field-done textarea {
    border-color: #86efac !important;
    background-color: #f0fdf4 !important;
    color: #374151 !important;
    box-shadow: none !important;
    cursor: pointer;
}

/* Done badge on label */
.cpc-gfj-done-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.cpc-gfj-done-badge svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* Hover on done field — hint it's editable */
.cpc-gfj-field-done:hover .cpc-gfj-done-badge {
    background: #dcfce7;
}

/* ── Shake animation (invalid required field) ──────────────────── */

@keyframes cpc-gfj-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.cpc-gfj-shake {
    animation: cpc-gfj-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ── Continue button (for checkboxes) ─────────────────────────── */

.cpc-gfj-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #f4580d, #e04800);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(244, 88, 13, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    animation: cpc-gfj-slide-in 0.25s ease both;
}

.cpc-gfj-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(244, 88, 13, 0.45);
}

.cpc-gfj-continue-btn:active {
    transform: translateY(0);
}
