/* TeDaCo Premium - Enhanced Forms CSS */

/* Dynamische Formular-Felder */
.kunde-fields,
.bewerbung-fields,
.partner-fields {
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    transition: all 0.3s ease;
    position: relative;
}

/* Kunden-Felder */
.kunde-fields {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.kunde-fields::before {
    content: "🏢 Projektdetails";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--secondary);
    color: #22c55e;
    padding: 0 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Bewerbungs-Felder */
.bewerbung-fields {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.bewerbung-fields::before {
    content: "💼 Bewerbungsdetails";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--secondary);
    color: var(--primary);
    padding: 0 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Partner-Felder */
.partner-fields {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.partner-fields::before {
    content: "🤝 Partnerdetails";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--secondary);
    color: #ffd700;
    padding: 0 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.kunde-fields.show,
.bewerbung-fields.show,
.partner-fields.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

/* File Upload Styling */
.file-input {
    display: none;
}

.file-upload-area {
    border: 2px dashed rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(56, 189, 248, 0.02);
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.1), transparent);
    transition: left 0.5s ease;
}

.file-upload-area:hover::before {
    left: 100%;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

.file-upload-area.has-file {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.file-upload-area:hover .upload-icon {
    transform: scale(1.1);
    opacity: 1;
}

.upload-text strong {
    color: var(--primary);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.upload-text small {
    color: rgba(255, 255, 255, 0.6);
    display: block;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.file-size {
    opacity: 0.8;
    font-size: 0.9rem;
}

.remove-file {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Form Enhancements */
.form-group {
    position: relative;
}

.form-group label {
    transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group select:focus + label {
    color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
    transform: translateY(-1px);
}

/* Phone Input Styling */
input[type="tel"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 45px;
}

/* Bewerbungs-Button Styling */
.bewerbung-btn {
    position: relative;
    overflow: hidden;
}

.bewerbung-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.bewerbung-btn:hover::before {
    left: 100%;
}

.bewerbung-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

/* Form Validation Enhancements */
.form-group.success input,
.form-group.success textarea,
.form-group.success select {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-group.success label::after {
    content: " ✓";
    color: #22c55e;
    font-weight: bold;
}

.field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.3s ease-in-out;
}

.field-error::before {
    content: "⚠️";
    font-size: 1rem;
}

/* Progress Indicator */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(56, 189, 248, 0.05);
    border-radius: 8px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.progress-step.active {
    color: var(--primary);
    font-weight: 600;
}

.progress-step.completed {
    color: #22c55e;
}

.progress-step::before {
    content: attr(data-step);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.progress-step.active::before {
    background: var(--primary);
    color: white;
}

.progress-step.completed::before {
    background: #22c55e;
    color: white;
    content: "✓";
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .bewerbung-fields {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .file-upload-area {
        padding: 1.5rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-progress {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .bewerbung-fields {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .file-upload-area {
        padding: 1rem;
    }
    
    .upload-text strong {
        font-size: 1rem;
    }
}
