/**
 * Custom CSS for GDPR Contact Form
 * 
 * @author Bodo Hoffmann
 * @version 1.0
 * @since 2024
 */

/* Custom Infront Colors */
:root {
    --infront-red: #E53E3E;
    --infront-blue: #3B82F6;
    --infront-gray: #F8FAFC;
    --infront-pink: #EC4899;
}

/* Form Animations */
.form-step {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease-in-out;
}

.form-step.active {
    opacity: 1;
    transform: translateX(0);
}

/* Progress Steps */
.progress-step {
    transition: all 0.3s ease-in-out;
}

.progress-step.completed {
    background-color: var(--infront-blue);
    color: white;
}

.progress-step.active {
    background-color: var(--infront-blue);
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Form Elements */
.form-input:focus {
    border-color: var(--infront-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-checkbox:checked {
    background-color: var(--infront-blue);
    border-color: var(--infront-blue);
}

/* Button Styles */
.btn-primary {
    background-color: var(--infront-pink);
    border-color: var(--infront-pink);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: #db2777;
    border-color: #db2777;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.btn-secondary {
    border-color: #d1d5db;
    color: #6b7280;
    transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* File Upload Styles */
.dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--infront-blue);
    background-color: rgba(59, 130, 246, 0.05);
}

.dropzone.dragover {
    border-style: solid;
    background-color: rgba(59, 130, 246, 0.1);
}

/* File List */
.file-item {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background-color: #f9fafb;
}

.file-item .file-name {
    font-weight: 500;
    color: #374151;
}

.file-item .file-size {
    color: #6b7280;
    font-size: 0.875rem;
}

.file-item .remove-file {
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.file-item .remove-file:hover {
    background-color: #fee2e2;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--infront-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error States */
.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success States */
.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.success-message {
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .progress-step {
        margin-bottom: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .form-container {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .form-input {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-input:focus {
        border-color: var(--infront-blue);
        background-color: #4b5563;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
*:focus {
    outline: 2px solid var(--infront-blue);
    outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .form-input {
        border: 2px solid #000;
    }
} 