/* ── WP Firefly Reviews — Frontend ─────────────────────────────── */

.wpfr {
    --wpfr-bg:            #ffffff;
    --wpfr-text:          #1d1d1f;
    --wpfr-subtext:       #86868b;
    --wpfr-star-active:   #ff9500;
    --wpfr-star-inactive: #d2d2d7;
    --wpfr-accent:        #0071e3;
    --wpfr-accent-text:   #ffffff;
    --wpfr-card-bg:       #f5f5f7;
    --wpfr-border:        #d2d2d7;
    --wpfr-success:       #34c759;

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 480px;
    margin: 0 auto;
    background: var(--wpfr-bg);
    border-radius: 20px;
    border: 1px solid var(--wpfr-border);
    overflow: hidden;
    text-align: center;
}

/* ── Steps ─────────────────────────────────────────────────────── */

.wpfr-step {
    display: none;
    padding: 48px 32px;
    animation: wpfr-fadeIn .4s ease;
}

.wpfr-step.active {
    display: block;
}

@keyframes wpfr-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Heading ───────────────────────────────────────────────────── */

.wpfr .wpfr-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--wpfr-text);
    margin: 0 0 6px;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.wpfr .wpfr-subheading {
    font-size: 15px;
    color: var(--wpfr-subtext);
    margin: 0 0 28px;
    line-height: 1.4;
}

/* ── Stars ─────────────────────────────────────────────────────── */

.wpfr-stars {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.wpfr-star {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--wpfr-star-inactive);
    transition: color .15s, transform .2s cubic-bezier(.34, 1.56, .64, 1);
    line-height: 1;
    border-radius: 50%;
    outline: none;
}

.wpfr-star:hover,
.wpfr-star:focus-visible {
    transform: scale(1.2);
}

.wpfr-star.active {
    color: var(--wpfr-star-active);
}

.wpfr-star.active:hover {
    transform: scale(1.25);
}

/* Chosen stars (mini display) */
.wpfr-chosen-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}

.wpfr-chosen-stars .wpfr-mini-star {
    width: 20px;
    height: 20px;
    color: var(--wpfr-star-active);
}

/* ── Feedback form ─────────────────────────────────────────────── */

.wpfr-feedback-prompt {
    font-size: 16px;
    font-weight: 600;
    color: var(--wpfr-text);
    margin: 0 0 20px;
    line-height: 1.4;
}

.wpfr-feedback-form {
    text-align: left;
}

.wpfr-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.wpfr-form-fields:empty {
    display: none;
}

.wpfr-form-fields input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wpfr-border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--wpfr-text);
    background: var(--wpfr-card-bg);
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}

.wpfr-form-fields input:focus {
    border-color: var(--wpfr-accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .12);
    background: var(--wpfr-bg);
}

.wpfr-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--wpfr-border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--wpfr-text);
    background: var(--wpfr-card-bg);
    resize: vertical;
    min-height: 100px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}

.wpfr-textarea:focus {
    border-color: var(--wpfr-accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .12);
    background: var(--wpfr-bg);
}

.wpfr-submit {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 24px;
    background: var(--wpfr-accent);
    color: var(--wpfr-accent-text);
    border: none;
    border-radius: 980px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    outline: none;
}

.wpfr-submit:hover {
    opacity: .88;
}

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

.wpfr-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Thank you ─────────────────────────────────────────────────── */

.wpfr-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--wpfr-success);
    color: #fff;
    margin-bottom: 20px;
    animation: wpfr-popIn .5s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes wpfr-popIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.wpfr-thanks-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--wpfr-text);
    margin: 0;
    line-height: 1.4;
}

/* ── Redirect ──────────────────────────────────────────────────── */

.wpfr-redirect-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--wpfr-text);
    margin: 0 0 24px;
    line-height: 1.4;
}

.wpfr-redirect-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wpfr-redirect-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--wpfr-subtext);
    animation: wpfr-pulse 1.5s ease-in-out infinite;
}

@keyframes wpfr-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .4; }
}

.wpfr-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--wpfr-border);
    border-top-color: var(--wpfr-accent);
    border-radius: 50%;
    animation: wpfr-spin .7s linear infinite;
}

@keyframes wpfr-spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 520px) {
    .wpfr-step { padding: 36px 20px; }
    .wpfr .wpfr-heading { font-size: 20px; }
    .wpfr-star svg { width: 32px; height: 32px; }
    .wpfr-form-fields { grid-template-columns: 1fr; }
}
