/* Forms Specific Styles */

/* Form Page Main Content */
.page-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Form Card Styling */
.form-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: white;
}

.form-card .card-header {
    background: #495057;
    border: none;
    padding: 2rem;
    text-align: center;
}

.form-card .card-header h3 {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1.8rem;
}

.form-card .card-body {
    padding: 2.5rem;
}

/* Form Type Selector */
.form-type-selector {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-type-selector:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Dynamic Form Container */
.dynamic-form-container {
    min-height: 200px;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.dynamic-form-container.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Form Fields */
.dynamic-form .form-group {
    margin-bottom: 1.5rem;
}

.dynamic-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.dynamic-form .form-control,
.dynamic-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dynamic-form .form-control:focus,
.dynamic-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Required Field Indicator */
.required-field::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545 !important;
}

.is-valid {
    border-color: #28a745 !important;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-submit:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: #e7f1ff;
}

.file-upload-label.dragover {
    border-color: #667eea;
    background: #e7f1ff;
}

/* Radio and Checkbox Groups */
.form-check {
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-label {
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Success Message */
.alert-success {
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem 1.5rem;
}

/* Error Message */
.alert-danger {
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
    padding: 1rem 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-card .card-body {
        padding: 1.5rem;
    }
    
    .form-card .card-header {
        padding: 1.5rem;
    }
    
    .form-card .card-header h3 {
        font-size: 1.5rem;
    }
}

/* Animation for form appearance */
.dynamic-form {
    animation: fadeInUp 0.5s ease;
}

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

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}