/**
 * Public CSS voor WJ Funnel Builder
 * 
 * Frontend stijlen voor funnels. Bevat responsieve styling en
 * ondersteuning voor verschillende stapsoorten.
 */

.wj-funnel {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Taal schakelaar */
.wj-funnel-language-switcher {
    text-align: right;
    margin-bottom: 20px;
    font-size: 14px;
}

.wj-funnel-language-label {
    margin-right: 5px;
    color: #666;
}

.wj-funnel-language-option {
    display: inline-block;
    padding: 2px 6px;
    text-decoration: none;
    color: #0073aa;
    border-radius: 3px;
}

.wj-funnel-language-option:hover {
    text-decoration: underline;
    color: #00a0d2;
}

.wj-funnel-language-option.active {
    font-weight: bold;
    color: #222;
    background-color: #f7f7f7;
}

/* Voortgangsbalk */
.wj-funnel-progress {
    margin-bottom: 30px;
}

.wj-funnel-progress-bar-container {
    height: 8px;
    background-color: #f1f1f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.wj-funnel-progress-bar {
    height: 100%;
    background-color: #0073aa;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.wj-funnel-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.wj-funnel-progress-steps::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #f1f1f1;
    z-index: 1;
}

.wj-funnel-progress-step {
    z-index: 2;
    text-align: center;
    position: relative;
}

.wj-funnel-progress-step-circle {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #ccc;
    color: #666;
    font-weight: 600;
    margin: 0 auto 5px;
    transition: all 0.3s ease;
}

.wj-funnel-progress-step.active .wj-funnel-progress-step-circle {
    border-color: #0073aa;
    color: #0073aa;
}

.wj-funnel-progress-step.completed .wj-funnel-progress-step-circle {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.wj-funnel-progress-step-label {
    font-size: 12px;
    color: #666;
    max-width: 80px;
    margin: 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wj-funnel-progress-step.active .wj-funnel-progress-step-label {
    color: #0073aa;
    font-weight: 600;
}

/* Funnel stappen */
.wj-funnel-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.wj-funnel-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wj-funnel-step-header {
    margin-bottom: 20px;
}

.wj-funnel-step-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.wj-funnel-step-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.wj-funnel-step-content {
    margin-bottom: 30px;
}

/* Formuliervelden */
.wj-funnel-form {
    max-width: 100%;
}

.wj-funnel-field-wrapper {
    margin-bottom: 20px;
}

.wj-funnel-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.wj-funnel-field-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.wj-funnel-required {
    color: #dc3232;
    margin-left: 2px;
}

.wj-funnel-form input[type="text"],
.wj-funnel-form input[type="email"],
.wj-funnel-form input[type="url"],
.wj-funnel-form input[type="tel"],
.wj-funnel-form input[type="number"],
.wj-funnel-form input[type="password"],
.wj-funnel-form textarea,
.wj-funnel-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
    color: #32373c;
    transition: border-color 0.3s ease;
}

.wj-funnel-form input:focus,
.wj-funnel-form textarea:focus,
.wj-funnel-form select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 2px rgba(0, 115, 170, 0.8);
    outline: none;
}

.wj-funnel-form input.wj-funnel-error,
.wj-funnel-form textarea.wj-funnel-error,
.wj-funnel-form select.wj-funnel-error {
    border-color: #dc3232;
}

.wj-funnel-error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
}

.wj-funnel-field-checkbox label,
.wj-funnel-field-radio label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    cursor: pointer;
}

.wj-funnel-field-checkbox input,
.wj-funnel-field-radio input {
    margin-right: 8px;
}

/* Keuze-opties */
.wj-funnel-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.wj-funnel-option {
    flex: 1 0 300px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.wj-funnel-option:hover {
    border-color: #0073aa;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.wj-funnel-option.selected {
    border-color: #0073aa;
    background-color: rgba(0, 115, 170, 0.05);
}

.wj-funnel-option-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: #0073aa;
}

.wj-funnel-option-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.wj-funnel-option-description {
    font-size: 14px;
    color: #666;
}

.wj-funnel-option-price {
    margin-top: 15px;
    font-weight: 600;
    color: #333;
}

.wj-funnel-option.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #0073aa;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Navigatieknoppen */
.wj-funnel-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.wj-funnel-prev-button {
    background-color: #f1f1f1;
    color: #555;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wj-funnel-prev-button:hover {
    background-color: #e1e1e1;
}

.wj-funnel-next-button,
.wj-funnel-submit-button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wj-funnel-next-button:hover,
.wj-funnel-submit-button:hover {
    background-color: #005c87;
}

.wj-funnel-submit-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.wj-funnel-submit-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

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

/* Bedankpagina */
.wj-funnel-thank-you-message {
    text-align: center;
    padding: 30px;
}

.wj-funnel-thank-you-title {
    font-size: 28px;
    color: #0073aa;
    margin-bottom: 20px;
}

.wj-funnel-thank-you-content {
    font-size: 16px;
    color: #333;
    max-width: 600px;
    margin: 0 auto;
}

.wj-funnel-check-icon {
    font-size: 60px;
    color: #46b450;
    margin-bottom: 20px;
    display: block;
}

/* Responsieve stijlen */
@media screen and (max-width: 768px) {
    .wj-funnel-options {
        flex-direction: column;
    }
    
    .wj-funnel-option {
        flex: 1 0 auto;
    }
    
    .wj-funnel-progress-step-label {
        display: none;
    }
    
    .wj-funnel-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .wj-funnel-prev-button {
        align-self: flex-start;
    }
    
    .wj-funnel-next-button,
    .wj-funnel-submit-button {
        align-self: flex-end;
    }
}

/* Thema-specifieke aanpassingen */
.wj-funnel-custom-theme-1 .wj-funnel-progress-bar {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.wj-funnel-custom-theme-1 .wj-funnel-next-button,
.wj-funnel-custom-theme-1 .wj-funnel-submit-button {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.wj-funnel-custom-theme-2 .wj-funnel-progress-bar {
    background: linear-gradient(90deg, #ff758c 0%, #ff7eb3 100%);
}

.wj-funnel-custom-theme-2 .wj-funnel-next-button,
.wj-funnel-custom-theme-2 .wj-funnel-submit-button {
    background: linear-gradient(90deg, #ff758c 0%, #ff7eb3 100%);
}

/* Mini keuzehulp stijlen */
.wj-funnel-mini-choice-helper {
    margin-bottom: 30px;
}

.wj-funnel-mini-choice-group {
    margin-bottom: 20px;
}

.wj-funnel-mini-choice-label {
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.wj-funnel-mini-choice-options {
    display: flex;
    gap: 10px;
}

.wj-funnel-mini-choice-option {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wj-funnel-mini-choice-option:hover {
    border-color: #0073aa;
}

.wj-funnel-mini-choice-option.selected {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
