/* Lenkmeister24 Application Form Styles - Flatsome Compatible */
.lenkmeister-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.8rem;
    color: #1E4FA1;
    margin-bottom: 1rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #999;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
}

.step.active {
    background: #1E4FA1;
    color: white;
    box-shadow: 0 2px 8px rgba(30, 79, 161, 0.3);
}

.form-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.form-card h3 {
    font-size: 1.3rem;
    color: #2B2B2B;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #F4C430;
    display: inline-block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2B2B2B;
}

/* Flatsome compatible select styles */
.form-group select,
.lenkmeister-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
    height: auto;
    min-height: 45px;
}

.form-group select optgroup {
    font-weight: 600;
    background-color: #f8f9fa;
    color: #1E4FA1;
    padding: 8px;
}

.form-group select option {
    padding: 8px;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
}

.form-group select:focus,
.lenkmeister-select:focus {
    outline: none;
    border-color: #1E4FA1;
    box-shadow: 0 0 0 3px rgba(30, 79, 161, 0.1);
}

.form-group select.error,
.lenkmeister-select.error {
    border-color: #E53935;
    background-color: rgba(229, 57, 53, 0.05);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1E4FA1;
    box-shadow: 0 0 0 3px rgba(30, 79, 161, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #E53935;
    background: rgba(229, 57, 53, 0.05);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

.form-group.half {
    flex: 1;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn-next,
.btn-prev,
.btn-submit {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #1E4FA1;
    color: white;
}

.btn-next:hover,
.btn-prev:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-next {
    background: #1E4FA1;
    color: white;
    margin-left: auto;
}

.btn-prev {
    background: #f0f0f0;
    color: #2B2B2B;
}

.btn-prev:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-submit {
    background: #E53935;
    color: white;
    width: 100%;
}

.btn-submit:hover:not(:disabled) {
    background: #c62828;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-small {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #e0e0e0;
}

.signature-container {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background: white;
}

#signature-pad {
    width: 100%;
    height: auto;
    min-height: 150px;
    background: white;
    touch-action: none;
    cursor: crosshair;
    display: block;
}

.review-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-item strong {
    color: #1E4FA1;
    display: block;
    margin-bottom: 0.5rem;
}

.preview-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.preview-container h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.form-message {
    margin-top: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dynamic-fields {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-card {
        padding: 1.5rem;
    }
    
    .progress-steps {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .step {
        border-radius: 8px;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-next,
    .btn-prev {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    #signature-pad {
        min-height: 120px;
    }
}

/* Loading state */
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}