/* Front-end states added by StepSave. The existing form design remains intact. */
.stepsave-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
    margin-left: 8px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    white-space: nowrap;
}

.stepsave-status:empty {
    display: none;
    margin-left: 0;
}

.stepsave-status::before {
    content: "";
    display: none;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.stepsave-status.is-saving,
.stepsave-status.is-saved,
.stepsave-status.is-error {
    padding: 4px 8px;
    border-radius: 999px;
}

.stepsave-status.is-saving::before,
.stepsave-status.is-saved::before,
.stepsave-status.is-error::before {
    display: block;
}

.stepsave-status.is-saving {
    color: #475569;
    background: #f1f5f9;
}

.stepsave-status.is-saving::before {
    animation: stepsave-pulse 1s ease-in-out infinite;
}

.stepsave-status.is-saved {
    color: #047857;
    background: #ecfdf5;
}

.stepsave-status.is-error {
    color: #b91c1c;
    background: #fef2f2;
}

.stepsave-save-error {
    width: 100%;
    margin: 18px 0 0;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.5;
}

.stepsave-save-error[hidden] {
    display: none !important;
}

.is-stepsave-saving {
    cursor: wait !important;
    opacity: 0.85;
}

.stepsave-honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@keyframes stepsave-pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

@media (max-width: 600px) {
    .stepsave-status {
        margin-left: 6px;
    }
}
