/* Recruiting Funnel Pro – Public CSS */

.rfp-funnel-wrapper {
    --rfp-primary: #667eea;
    --rfp-secondary: #764ba2;
    --rfp-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --rfp-bg: #f8f9ff;
    --rfp-white: #fff;
    --rfp-border: #e2e6ff;
    --rfp-text: #2d3748;
    --rfp-text-light: #718096;
    --rfp-btn-text: #fff;
    --rfp-radius: 16px;
    --rfp-shadow: 0 8px 40px rgba(102, 126, 234, 0.18);
    --rfp-font-size: 15px;
    --rfp-progress: var(--rfp-gradient);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 20px;
    color: var(--rfp-text);
    font-size: var(--rfp-font-size);
}

/* Progress Bar */
.rfp-progress-bar {
    background: var(--rfp-border);
    border-radius: 20px;
    height: 6px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.rfp-progress-bar-inner {
    height: 100%;
    background: var(--rfp-progress);
    border-radius: 20px;
    transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.rfp-progress-text {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--rfp-primary);
}

/* Loading */
.rfp-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--rfp-text-light);
}
.rfp-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--rfp-border);
    border-top-color: var(--rfp-primary);
    border-radius: 50%;
    animation: rfp-spin 0.7s linear infinite;
    margin: 0 auto 16px;
}
@keyframes rfp-spin { to { transform: rotate(360deg); } }

/* Funnel Content / Card */
.rfp-funnel-content {
    background: var(--rfp-white);
    border-radius: var(--rfp-radius);
    box-shadow: var(--rfp-shadow);
    padding: 40px;
    min-height: 200px;
    transition: all .3s ease;
    border: 1px solid var(--rfp-border);
}

/* Question Step */
.rfp-step {
    animation: rfp-stepIn .35s cubic-bezier(.4,0,.2,1);
}
@keyframes rfp-stepIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rfp-step-number {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--rfp-primary);
    background: rgba(102,126,234,.09);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.rfp-step-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 8px;
    color: var(--rfp-text);
}

.rfp-step-desc {
    font-size: 14.5px;
    color: var(--rfp-text-light);
    margin: 0 0 28px;
    line-height: 1.6;
}

/* Radio/Checkbox Options */
.rfp-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rfp-options-grid.rfp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rfp-option-item {
    position: relative;
}
.rfp-option-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.rfp-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid var(--rfp-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    font-size: 14.5px;
    font-weight: 500;
    background: var(--rfp-white);
    user-select: none;
}
.rfp-option-label:hover {
    border-color: var(--rfp-primary);
    background: rgba(102,126,234,.04);
    transform: translateX(3px);
}
.rfp-option-item input:checked + .rfp-option-label {
    border-color: var(--rfp-primary);
    background: rgba(102,126,234,.08);
    color: var(--rfp-primary);
    font-weight: 700;
}
.rfp-option-indicator {
    width: 20px; height: 20px;
    border: 2px solid var(--rfp-border);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rfp-option-item input[type="checkbox"] + .rfp-option-label .rfp-option-indicator {
    border-radius: 5px;
}
.rfp-option-item input:checked + .rfp-option-label .rfp-option-indicator {
    background: var(--rfp-gradient);
    border-color: transparent;
}
.rfp-option-item input:checked + .rfp-option-label .rfp-option-indicator::after {
    content: '';
    display: block;
    width: 6px; height: 6px;
    background: white;
    border-radius: 50%;
}
.rfp-option-item input[type="checkbox"]:checked + .rfp-option-label .rfp-option-indicator::after {
    width: 10px; height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5L4 7.5 8.5 2' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
    border-radius: 0;
}
.rfp-option-text { flex: 1; }

/* Text Inputs */
.rfp-input-wrap { margin-top: 8px; }
.rfp-text-input, .rfp-textarea-input, .rfp-select-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--rfp-border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--rfp-text);
    background: var(--rfp-white);
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    font-family: inherit;
}
.rfp-text-input:focus, .rfp-textarea-input:focus, .rfp-select-input:focus {
    outline: none;
    border-color: var(--rfp-primary);
    box-shadow: 0 0 0 4px rgba(102,126,234,.12);
}
.rfp-textarea-input { min-height: 120px; resize: vertical; }

/* Rating */
.rfp-rating {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.rfp-star {
    font-size: 36px;
    cursor: pointer;
    color: #cbd5e0;
    transition: color .15s, transform .15s;
    user-select: none;
}
.rfp-star:hover, .rfp-star.active { color: #f6ad55; transform: scale(1.15); }

/* File Upload */
.rfp-file-drop {
    border: 2px dashed var(--rfp-border);
    border-radius: 12px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    margin-top: 8px;
}
.rfp-file-drop:hover, .rfp-file-drop.dragover { border-color: var(--rfp-primary); background: rgba(102,126,234,.04); }
.rfp-file-drop-icon { font-size: 36px; margin-bottom: 10px; }
.rfp-file-drop p { margin: 0; font-size: 14px; color: var(--rfp-text-light); }
.rfp-file-drop strong { color: var(--rfp-primary); }
.rfp-file-drop input { display: none; }
.rfp-file-name { margin-top: 10px; font-size: 13px; color: var(--rfp-success,#38a169); font-weight: 600; }

/* Required Marker */
.rfp-required { color: #e53e3e; margin-left: 3px; }

/* Error */
.rfp-field-error {
    color: #e53e3e;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.rfp-input-error { border-color: #e53e3e !important; }

/* GDPR */
.rfp-gdpr-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: var(--rfp-bg);
    border-radius: 10px;
    border: 1px solid var(--rfp-border);
    margin-top: 20px;
    font-size: 13px;
    color: var(--rfp-text-light);
    line-height: 1.5;
}
.rfp-gdpr-wrap input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; margin-top: 2px; accent-color: var(--rfp-primary); }

/* Navigation */
.rfp-funnel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}
.rfp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    line-height: 1;
    font-family: inherit;
}
.rfp-btn:focus { outline: none; }
.rfp-btn-primary {
    background: var(--rfp-gradient);
    color: var(--rfp-btn-text);
    box-shadow: 0 4px 15px rgba(102,126,234,.35);
}
.rfp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,.45);
}
.rfp-btn-primary:active { transform: translateY(0); }
.rfp-btn-back {
    background: transparent;
    color: var(--rfp-text-light);
    border-color: var(--rfp-border);
}
.rfp-btn-back:hover { background: var(--rfp-bg); color: var(--rfp-primary); border-color: var(--rfp-primary); }

/* Loading state on btn */
.rfp-btn.loading { opacity: .7; pointer-events: none; }
.rfp-btn.loading::after {
    content: '';
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rfp-spin .7s linear infinite;
    margin-left: 4px;
}

/* Step Dots */
.rfp-funnel-footer { margin-top: 16px; text-align: center; }
.rfp-step-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.rfp-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--rfp-border);
    transition: all .3s;
}
.rfp-dot.active { background: var(--rfp-primary); width: 22px; border-radius: 4px; }
.rfp-dot.done { background: var(--rfp-primary); opacity: .4; }

/* Branding */
.rfp-branding { font-size: 11px; color: var(--rfp-text-light); opacity: .6; }

/* Thank You Screen */
.rfp-thank-you {
    text-align: center;
    padding: 20px 0;
    animation: rfp-stepIn .4s ease;
}
.rfp-ty-icon {
    width: 80px; height: 80px;
    background: var(--rfp-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    box-shadow: 0 8px 30px rgba(102,126,234,.3);
    animation: rfp-bounce .6s .2s ease both;
}
@keyframes rfp-bounce {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.rfp-ty-headline { font-size: 26px; font-weight: 800; margin: 0 0 12px; }
.rfp-ty-message  { font-size: 15px; color: var(--rfp-text-light); margin: 0 0 28px; line-height: 1.7; }

/* Minimal style override */
.rfp-style-minimal .rfp-funnel-content {
    box-shadow: none;
    border: none;
    padding: 20px 0;
    background: transparent;
}

/* Full-page style */
.rfp-style-full .rfp-funnel-wrapper {
    max-width: 100%;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rfp-bg);
}
.rfp-style-full .rfp-funnel-content {
    max-width: 680px;
    width: 100%;
}

/* Responsive */
/* Session Resume Banner */
.rfp-resume-banner {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, rgba(102,126,234,.06), rgba(118,75,162,.06));
    border-radius: 12px;
    border: 1px solid rgba(102,126,234,.15);
}
.rfp-resume-banner span { display: block; font-size: 15px; color: #4a5568; font-weight: 600; }
.rfp-btn-resume {
    background: var(--rfp-primary); color: #fff; border: none; padding: 10px 24px;
    border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px;
}
.rfp-btn-restart {
    background: transparent; color: #718096; border: 1px solid #e2e6ff; padding: 10px 24px;
    border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px;
}
.rfp-btn-resume:hover { opacity: .9; }
.rfp-btn-restart:hover { border-color: #cbd5e0; color: #4a5568; }

/* Accessibility: Focus Styles */
.rfp-text-input:focus-visible,
.rfp-textarea-input:focus-visible,
.rfp-select-input:focus-visible {
    outline: 2px solid var(--rfp-primary);
    outline-offset: 2px;
}
.rfp-option:focus-visible {
    outline: 2px solid var(--rfp-primary);
    outline-offset: 2px;
    border-radius: 10px;
}
.rfp-btn:focus-visible {
    outline: 2px solid var(--rfp-primary);
    outline-offset: 3px;
}

/* ── Floating Layout ── */
.rfp-style-floating .rfp-funnel-wrapper { max-width: 580px; }
.rfp-style-floating .rfp-funnel-content {
    box-shadow: 0 20px 60px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.06);
    border: none;
    padding: 48px;
}

/* ── Button Styles ── */
.rfp-btn-style-pill .rfp-btn { border-radius: 50px; }
.rfp-btn-style-square .rfp-btn { border-radius: 4px; }
.rfp-btn-style-outline .rfp-btn-primary {
    background: transparent;
    color: var(--rfp-primary);
    border: 2px solid var(--rfp-primary);
    box-shadow: none;
}
.rfp-btn-style-outline .rfp-btn-primary:hover {
    background: var(--rfp-gradient);
    color: var(--rfp-btn-text);
    border-color: transparent;
}

/* ── Option Display Styles ── */
/* Cards style */
.rfp-opt-style-cards .rfp-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.rfp-opt-style-cards .rfp-option-label {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
    gap: 8px;
    min-height: 80px;
    justify-content: center;
}
.rfp-opt-style-cards .rfp-option-indicator { display: none; }

/* Buttons style (inline) */
.rfp-opt-style-buttons .rfp-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rfp-opt-style-buttons .rfp-option-label {
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 13.5px;
    gap: 6px;
}
.rfp-opt-style-buttons .rfp-option-indicator { width: 14px; height: 14px; }
.rfp-opt-style-buttons .rfp-option-item input:checked + .rfp-option-label {
    background: var(--rfp-gradient);
    color: #fff;
    border-color: transparent;
}
.rfp-opt-style-buttons .rfp-option-item input:checked + .rfp-option-label .rfp-option-indicator { display: none; }

/* Minimal style (no borders) */
.rfp-opt-style-minimal .rfp-option-label {
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    background: transparent;
}
.rfp-opt-style-minimal .rfp-option-label:hover { background: rgba(102,126,234,.06); }
.rfp-opt-style-minimal .rfp-option-item input:checked + .rfp-option-label { background: rgba(102,126,234,.1); }

/* ── Options Columns ── */
.rfp-opt-cols-2 .rfp-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rfp-opt-cols-3 .rfp-options-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ── Animations ── */
.rfp-anim-fade .rfp-step {
    animation: rfp-fadeIn .4s ease;
}
@keyframes rfp-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.rfp-anim-slide-left .rfp-step {
    animation: rfp-slideLeft .35s cubic-bezier(.4,0,.2,1);
}
@keyframes rfp-slideLeft {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
.rfp-anim-scale .rfp-step {
    animation: rfp-scaleIn .3s cubic-bezier(.4,0,.2,1);
}
@keyframes rfp-scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.rfp-anim-none .rfp-step { animation: none; }

/* ── Logo ── */
.rfp-funnel-logo {
    text-align: center;
    margin-bottom: 20px;
}
.rfp-funnel-logo img {
    max-height: 60px;
    max-width: 200px;
    height: auto;
}

/* ── Background Image ── */
.rfp-has-bg-image {
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rfp-has-bg-image .rfp-funnel-content {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
}

/* ── Font Size Scaling ── */
.rfp-funnel-wrapper .rfp-option-label { font-size: var(--rfp-font-size); }
.rfp-funnel-wrapper .rfp-text-input,
.rfp-funnel-wrapper .rfp-textarea-input,
.rfp-funnel-wrapper .rfp-select-input { font-size: var(--rfp-font-size); }
.rfp-funnel-wrapper .rfp-btn { font-size: var(--rfp-font-size); }
.rfp-funnel-wrapper .rfp-step-desc { font-size: var(--rfp-font-size); }

@media (max-width: 600px) {
    .rfp-funnel-content { padding: 24px 20px; }
    .rfp-step-title { font-size: 18px; }
    .rfp-options-grid.rfp-grid-2 { grid-template-columns: 1fr; }
    .rfp-opt-style-cards .rfp-options-grid { grid-template-columns: 1fr; }
    .rfp-opt-cols-2 .rfp-options-grid { grid-template-columns: 1fr; }
    .rfp-opt-cols-3 .rfp-options-grid { grid-template-columns: 1fr 1fr; }
    .rfp-btn { padding: 12px 20px; font-size: 14px; }
    .rfp-funnel-nav { flex-direction: column-reverse; }
    .rfp-funnel-nav .rfp-btn { width: 100%; justify-content: center; }
    .rfp-style-floating .rfp-funnel-content { padding: 24px 20px; }
}
