/* Funnel Builder Frontend Styles */

.msfp-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Progress Bar */
.funnel-progress-bar-container {
    margin-bottom: 30px;
}

.funnel-progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.funnel-progress-fill {
    height: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.funnel-progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Funnel Form */
.funnel-form {
    position: relative;
}

.funnel-step {
    animation: fadeIn 0.3s ease-in;
}

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

.funnel-question {
    margin-bottom: 30px;
}

.funnel-question-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

.funnel-required {
    color: #d63638;
    margin-left: 4px;
}

/* Answer Container */
.funnel-answer-container {
    margin-bottom: 20px;
}

/* Input Fields */
.funnel-input,
.funnel-textarea,
.funnel-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.funnel-input:focus,
.funnel-textarea:focus,
.funnel-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.funnel-input.error,
.funnel-textarea.error,
.funnel-select.error {
    border-color: #d63638;
}

.funnel-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Radio & Checkbox */
.funnel-radio-label,
.funnel-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.funnel-radio-label:hover,
.funnel-checkbox-label:hover {
    background-color: #f9f9f9;
}

.funnel-radio:checked ~ .funnel-radio-label,
.funnel-checkbox:checked ~ .funnel-checkbox-label {
    font-weight: 600;
}

.funnel-radio,
.funnel-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.funnel-radio-text,
.funnel-checkbox-text {
    flex: 1;
}

/* Select */
.funnel-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}

/* Buttons */
.funnel-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.funnel-btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.funnel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.funnel-btn-back {
    background-color: #f0f0f0;
    color: #333;
}

.funnel-btn-back:hover:not(:disabled) {
    background-color: #e0e0e0;
}

/* Error Messages */
.funnel-error-message {
    color: #d63638;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.funnel-error-message.show {
    display: block;
}

/* Thank You Page */
.funnel-thank-you {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease-in;
}

.funnel-thank-you-headline {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.funnel-thank-you-message {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Loading State */
.funnel-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.funnel-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .funnel-question-text {
        font-size: 20px;
    }
    
    .funnel-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .funnel-thank-you-headline {
        font-size: 24px;
    }
    
    .funnel-thank-you-message {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .msfp-container {
        padding: 15px;
    }
    
    .funnel-navigation {
        flex-direction: column-reverse;
    }
    
    .funnel-btn {
        width: 100%;
    }
    
    .funnel-radio-label,
    .funnel-checkbox-label {
        padding: 10px 12px;
    }
}
