/* ============================================
   ONBOARDING QUESTIONNAIRE — Flat, Professional
   Matches FriendlyShell design system
   ============================================ */

/* Floating Button */
.q-float-btn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-accent, #2D5A3D);
    color: #fff;
    border: 2px solid var(--color-accent, #2D5A3D);
    border-radius: 0;
    padding: 14px 24px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
    transition: all 0.4s ease;
    animation: q-pulse 2.8s ease-in-out infinite;
}
.q-float-btn:hover {
    background: transparent;
    color: var(--color-accent, #2D5A3D);
    animation: none;
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.1));
}
.q-float-btn svg { flex-shrink: 0; }

@keyframes q-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(45, 90, 61, 0.25); }
}

body.q-modal-open .q-float-btn { display: none; }

/* Overlay */
.q-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.q-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.q-modal {
    background: var(--color-bg-primary, #fff);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 0;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.1));
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}
.q-overlay.active .q-modal {
    transform: translateY(0);
}

/* Scrollbar */
.q-modal::-webkit-scrollbar { width: 4px; }
.q-modal::-webkit-scrollbar-track { background: transparent; }
.q-modal::-webkit-scrollbar-thumb { background: var(--border-color, #E0E0E0); }

/* Close */
.q-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted, #888);
    padding: 4px;
    transition: color 0.2s;
    z-index: 2;
}
.q-close:hover { color: var(--color-text-primary, #1A1A1A); }

/* Header */
.q-header {
    padding: 32px 32px 0;
    border-bottom: none;
}
.q-header-label {
    display: inline-block;
    font-size: var(--text-xs, 0.75rem);
    font-weight: 600;
    color: var(--color-accent, #2D5A3D);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}
.q-header h2 {
    font-family: var(--font-display, 'Inter', sans-serif);
    font-size: var(--text-xl, 1.5rem);
    font-weight: 700;
    color: var(--color-text-primary, #1A1A1A);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.q-header p {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-secondary, #555);
    line-height: 1.5;
}

/* Progress */
.q-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 24px 32px 0;
}
.q-progress-bar {
    flex: 1;
    height: 3px;
    background: var(--border-color, #E0E0E0);
    transition: background 0.4s ease;
}
.q-progress-bar.done,
.q-progress-bar.current {
    background: var(--color-accent, #2D5A3D);
}
.q-step-label {
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-text-muted, #888);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: 10px;
}

/* Steps */
.q-steps {
    position: relative;
    overflow: hidden;
    min-height: 260px;
}
.q-step {
    padding: 28px 32px 32px;
    display: none;
    animation: q-slide-in 0.3s ease;
}
.q-step.active { display: block; }

@keyframes q-slide-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Step Title */
.q-step-title {
    font-size: var(--text-base, 0.95rem);
    font-weight: 600;
    color: var(--color-text-primary, #1A1A1A);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #E0E0E0);
}

/* Form Elements — match site's .form-input / .form-label */
.q-label {
    display: block;
    font-size: var(--text-sm, 0.875rem);
    font-weight: 500;
    color: var(--color-text-primary, #1A1A1A);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.q-input, .q-select, .q-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--color-bg-primary, #fff);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 0;
    color: var(--color-text-primary, #1A1A1A);
    font-family: inherit;
    font-size: var(--text-base, 0.95rem);
    transition: border-color 150ms ease;
    outline: none;
}
.q-input:focus, .q-select:focus, .q-textarea:focus {
    border-color: var(--color-accent, #2D5A3D);
    box-shadow: none;
}
.q-input::placeholder, .q-textarea::placeholder {
    color: var(--color-text-muted, #888);
}
.q-textarea {
    resize: vertical;
    min-height: 80px;
}
.q-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.q-field { margin-bottom: 16px; }
.q-field:last-child { margin-bottom: 0; }

.q-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Checkbox Grid */
.q-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.q-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: var(--text-sm, 0.85rem);
    color: var(--color-text-secondary, #555);
    user-select: none;
}
.q-checkbox-item:hover {
    border-color: var(--border-color-hover, #CCC);
}
.q-checkbox-item input[type="checkbox"] {
    accent-color: var(--color-accent, #2D5A3D);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.q-checkbox-item.checked {
    border-color: var(--color-accent, #2D5A3D);
    background: rgba(45, 90, 61, 0.04);
    color: var(--color-text-primary, #1A1A1A);
    font-weight: 500;
}

/* Navigation */
.q-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px 28px;
    border-top: 1px solid var(--border-color, #E0E0E0);
    margin-top: 0;
    padding-top: 20px;
}
.q-btn {
    font-family: inherit;
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.q-btn-back {
    background: none;
    color: var(--color-text-muted, #888);
    padding: 12px 0;
}
.q-btn-back:hover { color: var(--color-text-primary, #1A1A1A); }

.q-btn-next {
    background: var(--color-accent, #2D5A3D);
    color: #fff;
    border: 2px solid var(--color-accent, #2D5A3D);
    padding: 12px 32px;
    border-radius: 0;
    margin-left: auto;
}
.q-btn-next:hover {
    background: transparent;
    color: var(--color-accent, #2D5A3D);
}
.q-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.q-btn-next.loading {
    pointer-events: none;
    opacity: 0.6;
}
.q-btn-next.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: q-spin 0.6s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes q-spin { to { transform: rotate(360deg); } }

/* Success */
.q-success {
    text-align: center;
    padding: 52px 32px;
}
.q-success-icon {
    width: 56px;
    height: 56px;
    border: 2px solid var(--color-accent, #2D5A3D);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.q-success h3 {
    font-size: var(--text-lg, 1.15rem);
    font-weight: 700;
    color: var(--color-text-primary, #1A1A1A);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}
.q-success p {
    color: var(--color-text-secondary, #555);
    font-size: var(--text-sm, 0.875rem);
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}

/* Toast */
.q-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text-primary, #1A1A1A);
    color: #fff;
    padding: 12px 24px;
    font-size: var(--text-sm, 0.85rem);
    font-family: var(--font-body, 'Inter', sans-serif);
    z-index: 10001;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    animation: q-slide-in 0.3s ease;
}

/* Mobile */
@media (max-width: 600px) {
    .q-float-btn {
        bottom: 18px;
        left: 14px;
        padding: 12px 18px;
        font-size: 0.75rem;
    }
    .q-float-btn .q-btn-label { display: none; }
    .q-float-btn { padding: 13px; }
    .q-modal { max-width: 100%; }
    .q-header, .q-step, .q-progress { padding-left: 20px; padding-right: 20px; }
    .q-nav { padding-left: 20px; padding-right: 20px; }
    .q-checkbox-grid { grid-template-columns: 1fr; }
    .q-row { grid-template-columns: 1fr; }
    .q-header h2 { font-size: 1.25rem; }
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.wa-float-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    border: 2px solid #25D366;
    border-radius: 0;
    padding: 14px 24px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
    transition: all 0.4s ease;
    animation: wa-pulse 2.8s ease-in-out infinite;
    animation-delay: 1.4s;
}
.wa-float-btn:hover {
    background: transparent;
    color: #25D366;
    animation: none;
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.1));
}
.wa-float-btn svg { flex-shrink: 0; }

@keyframes wa-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25); }
}

body.q-modal-open .wa-float-btn { display: none; }

@media (max-width: 600px) {
    .wa-float-btn {
        bottom: 18px;
        right: 14px;
        padding: 12px 18px;
        font-size: 0.75rem;
    }
    .wa-float-btn .wa-btn-label { display: none; }
    .wa-float-btn { padding: 13px; }
}

/* ============================================
   CONTACT CTA BLOCK (replaces contact form)
   ============================================ */
.contact-cta-wrapper {
    padding: var(--space-10, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-cta-wrapper.glass-card {
    background: var(--color-bg-secondary, #F5F5F0);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 0;
}
.contact-cta-wrapper.glass-card:hover {
    box-shadow: none;
    border-color: var(--border-color, #E0E0E0);
}
.contact-cta-content {
    text-align: center;
    max-width: 380px;
}
.contact-cta-heading {
    font-size: var(--text-xl, 1.5rem);
    font-weight: 700;
    color: var(--color-text-primary, #1A1A1A);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-3, 0.75rem);
}
.contact-cta-text {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-secondary, #555);
    line-height: 1.6;
    margin-bottom: var(--space-6, 1.5rem);
}
.contact-cta-divider {
    width: 40px;
    height: 1px;
    background: var(--border-color, #E0E0E0);
    margin: var(--space-6, 1.5rem) auto;
}
.contact-cta-alt {
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-4, 1rem);
}
