/* ============================================================
   PuroAds Multi-Step Form — form.css  v2.0
   Mobile-first · Brand: #0b3d2e · #fbbc04
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
.prf-wrapper {
    --prf-green:      #0b3d2e;
    --prf-green-2:    #0d4a38;
    --prf-yellow:     #fbbc04;
    --prf-text:       #0f1b17;
    --prf-muted:      #6d8179;
    --prf-border:     rgba(11, 61, 46, .14);
    --prf-bg:         #fff;
    --prf-bg-soft:    #f8f7f3;
    --prf-radius:     20px;
    --prf-radius-sm:  12px;
    --prf-shadow:     0 8px 40px rgba(11, 61, 46, .1);
    --prf-transition: 0.28s cubic-bezier(.4, 0, .2, 1);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--prf-bg);
    border-radius: var(--prf-radius);
    box-shadow: var(--prf-shadow);
    border: 1px solid var(--prf-border);
    padding: 24px 18px 28px;
    max-width: 560px;
    margin-inline: auto;
    position: relative;
    overflow: hidden;
    color: var(--prf-text);
    box-sizing: border-box;
}

/* ── Progress area ─────────────────────────────────────────── */
.prf-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-block-end: 22px;
    min-height: 28px;
}

.prf-btn-back {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--prf-muted);
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: color var(--prf-transition);
    flex-shrink: 0;
}

.prf-btn-back:hover {
    color: var(--prf-green);
}

.prf-btn-back.is-visible {
    display: flex;
}

.prf-progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(11, 61, 46, .1);
    border-radius: 100px;
    overflow: hidden;
}

.prf-progress-fill {
    height: 100%;
    background: var(--prf-yellow);
    border-radius: 100px;
    transition: width var(--prf-transition);
    width: 25%;
}

.prf-progress-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--prf-muted);
    white-space: nowrap;
    min-width: 68px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Form header ───────────────────────────────────────────── */
.prf-header {
    margin-block-end: 22px;
}

.prf-title {
    font-size: clamp(17px, 4.5vw, 23px);
    font-weight: 800;
    color: var(--prf-text);
    line-height: 1.2;
    margin: 0 0 6px;
}

.prf-subtitle {
    font-size: 14px;
    color: var(--prf-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Steps ─────────────────────────────────────────────────── */
.prf-step {
    display: none;
}

.prf-step.is-active {
    display: block;
    animation: prfIn var(--prf-transition) both;
}

.prf-step.is-out {
    animation: prfOut var(--prf-transition) both;
}

@keyframes prfIn {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes prfOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-18px); }
}

.prf-step-q {
    font-size: clamp(15px, 4vw, 19px);
    font-weight: 700;
    color: var(--prf-text);
    margin: 0 0 6px;
    line-height: 1.3;
}

.prf-step-q strong {
    color: var(--prf-green);
}

.prf-step-hint {
    font-size: 13px;
    color: var(--prf-muted);
    margin: 0 0 18px;
    line-height: 1.5;
}

/* ── Option cards (radio) ──────────────────────────────────── */
.prf-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-block-end: 4px;
}

.prf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 16px 10px;
    background: var(--prf-bg-soft);
    border: 1.5px solid var(--prf-border);
    border-radius: var(--prf-radius-sm);
    cursor: pointer;
    transition:
        border-color var(--prf-transition),
        background var(--prf-transition),
        box-shadow var(--prf-transition),
        transform 0.12s ease;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    outline-offset: 3px;
}

.prf-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.prf-card:hover {
    border-color: rgba(11, 61, 46, .4);
    background: rgba(11, 61, 46, .04);
    transform: translateY(-1px);
}

.prf-card:active {
    transform: scale(.97) translateY(0);
}

.prf-card.is-selected {
    border-color: var(--prf-green);
    background: var(--prf-green);
    box-shadow: 0 3px 14px rgba(11, 61, 46, .22);
}

.prf-card.is-selected .prf-card-icon {
    transform: scale(1.1);
}

.prf-card.is-selected .prf-card-label {
    color: #fff;
    font-weight: 700;
}

/* Wide card variant (yes/no) */
.prf-card--wide {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    text-align: left;
}

.prf-card-icon {
    font-size: 28px;
    line-height: 1;
    display: block;
    transition: transform var(--prf-transition);
    flex-shrink: 0;
}

.prf-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--prf-text);
    line-height: 1.3;
    transition: color var(--prf-transition);
}

.prf-card-desc {
    font-size: 11px;
    font-weight: 400;
    color: var(--prf-muted);
    margin-block-start: 2px;
    line-height: 1.3;
    transition: color var(--prf-transition);
}

.prf-card.is-selected .prf-card-desc {
    color: rgba(255,255,255,.75);
}

/* ── Web choice (step 3) ───────────────────────────────────── */
.prf-web-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-block-end: 16px;
}

.prf-web-url {
    display: none;
    margin-block-end: 18px;
}

.prf-web-url.is-visible {
    display: block;
    animation: prfIn var(--prf-transition) both;
}

/* ── Chips (small pill options) ────────────────────────────── */
.prf-chips-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--prf-muted);
    margin: 18px 0 10px;
    letter-spacing: .01em;
}

.prf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block-end: 20px;
}

.prf-chip {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.prf-chip input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.prf-chip span {
    display: block;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--prf-text);
    background: var(--prf-bg-soft);
    border: 1.5px solid var(--prf-border);
    border-radius: 100px;
    transition:
        background var(--prf-transition),
        border-color var(--prf-transition),
        color var(--prf-transition);
    white-space: nowrap;
}

.prf-chip.is-selected span {
    background: var(--prf-yellow);
    border-color: var(--prf-yellow);
    color: var(--prf-text);
}

/* ── Text inputs ───────────────────────────────────────────── */
.prf-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prf-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--prf-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.prf-optional {
    font-weight: 400;
    color: var(--prf-muted);
    font-size: 11px;
}

.prf-input {
    width: 100%;
    padding: 13px 15px;
    font-size: 15px;
    color: var(--prf-text);
    background: var(--prf-bg);
    border: 1.5px solid var(--prf-border);
    border-radius: var(--prf-radius-sm);
    outline: none;
    transition: border-color var(--prf-transition), box-shadow var(--prf-transition);
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.prf-input:focus {
    border-color: var(--prf-green);
    box-shadow: 0 0 0 3px rgba(11, 61, 46, .1);
}

.prf-input.is-error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, .1);
}

.prf-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Privacy checkbox ──────────────────────────────────────── */
.prf-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--prf-muted);
    line-height: 1.5;
    user-select: none;
}

.prf-privacy input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    accent-color: var(--prf-green);
    cursor: pointer;
    margin-block-start: 1px;
}

.prf-privacy a {
    color: var(--prf-green);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Error message ─────────────────────────────────────────── */
.prf-error-msg {
    font-size: 13px;
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
    padding: 11px 15px;
    display: none;
    line-height: 1.5;
    animation: prfIn var(--prf-transition) both;
}

.prf-error-msg.is-visible {
    display: block;
}

/* ── Buttons ───────────────────────────────────────────────── */
.prf-btn-next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--prf-green);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition:
        background var(--prf-transition),
        box-shadow var(--prf-transition),
        transform 0.12s ease;
    font-family: inherit;
    margin-block-start: 10px;
    -webkit-tap-highlight-color: transparent;
}

.prf-btn-next:hover {
    background: var(--prf-green-2);
    box-shadow: 0 4px 18px rgba(11, 61, 46, .28);
}

.prf-btn-next:active {
    transform: scale(.98);
}

.prf-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 17px 28px;
    font-size: 16px;
    font-weight: 800;
    color: var(--prf-text);
    background: var(--prf-yellow);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition:
        background var(--prf-transition),
        box-shadow var(--prf-transition),
        transform 0.12s ease;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.prf-btn-submit:hover {
    background: #f0b000;
    box-shadow: 0 5px 20px rgba(251, 188, 4, .45);
}

.prf-btn-submit:active {
    transform: scale(.98);
}

.prf-btn-submit.is-loading {
    pointer-events: none;
    cursor: default;
}

.prf-btn-submit.is-loading .prf-btn-text {
    opacity: .5;
}

/* Spinner */
.prf-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(15, 27, 23, .25);
    border-top-color: var(--prf-text);
    border-radius: 50%;
    animation: prfSpin .75s linear infinite;
    flex-shrink: 0;
}

.prf-btn-submit.is-loading .prf-spinner {
    display: block;
}

@keyframes prfSpin {
    to { transform: rotate(360deg); }
}

/* ── Trust badge ───────────────────────────────────────────── */
.prf-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-block-start: 12px;
    font-size: 12px;
    color: var(--prf-muted);
}

.prf-trust svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Success state ─────────────────────────────────────────── */
.prf-success {
    display: none;
    text-align: center;
    padding: 12px 0 8px;
}

.prf-success.is-visible {
    display: block;
    animation: prfIn var(--prf-transition) both;
}

.prf-success-icon {
    font-size: 60px;
    display: block;
    margin-block-end: 16px;
    animation: prfBounce .5s ease .1s both;
}

@keyframes prfBounce {
    0%   { transform: scale(0);   opacity: 0; }
    60%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}

.prf-success-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--prf-text);
    margin: 0 0 10px;
}

.prf-success-body {
    font-size: 15px;
    color: var(--prf-text);
    line-height: 1.6;
    margin: 0 0 8px;
}

.prf-success-note {
    font-size: 13px;
    color: var(--prf-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Responsive: tablet+ ───────────────────────────────────── */
@media (min-width: 480px) {
    .prf-wrapper {
        padding: 32px 32px 36px;
    }
}

@media (min-width: 600px) {
    .prf-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .prf-step,
    .prf-progress-fill,
    .prf-card,
    .prf-chip span,
    .prf-input,
    .prf-btn-next,
    .prf-btn-submit,
    .prf-success-icon {
        animation: none !important;
        transition: none !important;
    }
}
