/* ================================================================
   FF Survey — Frontend Styles
   ================================================================ */

/* ----------------------------------------------------------------
   Outer wrapper
   ---------------------------------------------------------------- */
.ffs-survey-wrap {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ----------------------------------------------------------------
   Survey title — displayed inside the progress card when enabled
   ---------------------------------------------------------------- */
.ffs-survey-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 14px 0;
    padding: 0;
    line-height: 1.3;
    text-align: center;
}

/* ----------------------------------------------------------------
   Cloudflare Turnstile element
   ---------------------------------------------------------------- */
.ffs-element-turnstile {
    padding: 4px 0 8px;
}

/* Flexible size fills width automatically; normal/compact need centering */
.ffs-element-turnstile .cf-turnstile:not([data-size="flexible"]) {
    margin: 0 auto;
    display: table;
}

.ffs-turnstile-notice {
    color: #b91c1c;
    font-size: 13px;
    margin: 0;
    padding: 8px 0;
}

.ffs-turnstile-error {
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    margin: 6px 0 0;
    padding: 0;
}

/* ----------------------------------------------------------------
   Progress indicator card — sits above the survey box
   ---------------------------------------------------------------- */
.ffs-progress-card {
    background: #fff;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    padding: 18px 24px 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.ffs-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 14px;
}

.ffs-progress-fill {
    height: 100%;
    background: #0ea5e9;
    border-radius: 99px;
    transition: width 0.35s ease;
}

.ffs-step-indicators {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.ffs-step-indicators::before {
    content: '';
    position: absolute;
    top: 13px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.ffs-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.ffs-step-dot-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, color 0.25s;
}

.ffs-step-dot.active .ffs-step-dot-num {
    background: #0ea5e9;
    color: #fff;
}

.ffs-step-dot.completed .ffs-step-dot-num {
    background: #22c55e;
    color: #fff;
}

/* Checkmark on completed dots */
.ffs-step-dot.completed .ffs-step-dot-num::after {
    content: '✓';
    font-size: 13px;
    font-weight: 700;
}

.ffs-step-dot.completed .ffs-step-dot-num {
    font-size: 0; /* hide number, show checkmark */
}

.ffs-step-dot-label {
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ffs-step-dot.active .ffs-step-dot-label {
    color: #0ea5e9;
    font-weight: 600;
}

/* ----------------------------------------------------------------
   Survey content box
   ---------------------------------------------------------------- */
.ffs-survey {
    background: #fff;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    padding: 28px 24px;
    box-sizing: border-box;
}

/* ----------------------------------------------------------------
   Step visibility
   ---------------------------------------------------------------- */
.ffs-step-inactive {
    display: none !important;
}

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

/* ----------------------------------------------------------------
   Elements — shared
   ---------------------------------------------------------------- */
.ffs-element {
    margin-bottom: 16px;
}

.ffs-element:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------------------
   Content block
   ---------------------------------------------------------------- */
.ffs-element-content {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #1d2327;
    text-align: center;
}

.ffs-element-content h1,
.ffs-element-content h2,
.ffs-element-content h3 {
    margin: 0 0 8px;
    line-height: 1.3;
    color: #1d2327;
}

.ffs-element-content p {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 400;
    color: #374151;
}

.ffs-element-content p:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------------------
   Image element
   ---------------------------------------------------------------- */
.ffs-element-image {
    text-align: center;
}

.ffs-element-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: inline-block;
}

/* ----------------------------------------------------------------
   Offer card
   ---------------------------------------------------------------- */
.ffs-element-offer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ffs-offer-image {
    margin-bottom: 14px;
}

.ffs-offer-image img {
    max-width: 100%;
    max-height: 160px;
    height: auto;
    border-radius: 6px;
    display: inline-block;
}

.ffs-offer-headline {
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 8px;
    line-height: 1.3;
}

.ffs-offer-subheadline {
    font-size: 14px;
    color: #4a5568;
    margin: 0 0 16px;
    line-height: 1.5;
    font-weight: 400;
}

.ffs-offer-cta {
    display: inline-block;
    text-decoration: none !important;
}

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */
.ffs-element-button {
    text-align: center;
}

.ffs-survey-wrap .ffs-survey-btn:not(.ffs-btn-text-link) {
    display: block !important;
    width: 100% !important;
    padding: 14px 24px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    background: #064E67 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    letter-spacing: .3px !important;
    text-align: center !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s !important;
    box-shadow: 0 2px 6px rgba(6,78,103,.18) !important;
    box-sizing: border-box !important;
}

.ffs-survey-wrap .ffs-survey-btn:not(.ffs-btn-text-link):hover {
    background: #053d52 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(6,78,103,.25) !important;
    color: #fff !important;
}

.ffs-survey-wrap .ffs-survey-btn:not(.ffs-btn-text-link):active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(6,78,103,.15) !important;
}

/* Offer CTA sits inside the offer card — slightly smaller */
.ffs-survey-wrap .ffs-element-offer .ffs-offer-cta {
    display: inline-block !important;
    width: auto !important;
    min-width: 200px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
}

/* Text-link style button — "No thanks" / secondary action */
.ffs-survey-wrap .ffs-btn-text-link {
    display: block !important;
    width: auto !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #9ca3af !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 6px 0 !important;
    cursor: pointer !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    letter-spacing: 0 !important;
    margin: 0 auto !important;
    transition: color 0.15s !important;
    transform: none !important;
}

.ffs-survey-wrap .ffs-btn-text-link:hover {
    background: none !important;
    color: #6b7280 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ----------------------------------------------------------------
   Completion message
   ---------------------------------------------------------------- */
.ffs-completion-msg {
    padding: 28px 24px;
    text-align: center;
}

.ffs-completion-msg p {
    font-size: 16px;
    font-weight: 500;
    color: #137333;
    background: #e6f4ea;
    border: 1px solid #b7dfbf;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 0;
    line-height: 1.55;
}

/* ----------------------------------------------------------------
   Error state
   ---------------------------------------------------------------- */
.ffs-error {
    color: #c5221f;
    font-size: 14px;
    padding: 10px 0;
}

/* ----------------------------------------------------------------
   Mobile
   ---------------------------------------------------------------- */
@media (max-width: 560px) {

    .ffs-survey-wrap {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .ffs-progress-card,
    .ffs-survey {
        padding: 16px 16px 14px;
        border-radius: 6px;
    }

    .ffs-step-dot-num {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .ffs-step-indicators::before {
        top: 11px;
    }

    /* Hide step labels on mobile except the active one */
    .ffs-step-dot-label {
        display: none;
    }

    .ffs-step-dot.active .ffs-step-dot-label {
        display: block;
        font-size: 11px;
        white-space: normal;
        max-width: 70px;
    }

    .ffs-element-content {
        font-size: 16px;
    }

    .ffs-survey-wrap .ffs-survey-btn {
        font-size: 16px !important;
        padding: 13px 20px !important;
    }
}
