/* Form Styling for ChatbotClient Application Forms */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Container */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.form-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.form-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.form-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Form Content */
.form-content {
    padding: 2rem;
}

/* Messages */
.messages {
    margin-bottom: 1.5rem;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.message.warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Fieldsets */
fieldset {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
}

fieldset legend {
    font-weight: 600;
    font-size: 1.2rem;
    color: #374151;
    padding: 0 1rem;
    background: white;
    border-radius: 4px;
    border: 2px solid #e5e7eb;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

/* Labels */
label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Textarea */
textarea {
    resize: vertical;
    min-height: 100px;
}

/* Select */
select {
    cursor: pointer;
}

/* Form Errors */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.errorlist li {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 4px 0;
}

.field-errors {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Form Errors Styling */
.form-errors {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #fca5a5;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    margin-bottom: 1rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
}

/* Footer Links */
.form-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.form-footer p {
    margin: 0;
    color: #6b7280;
}

.form-footer a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Admin Context Styling */
.admin-badge {
    display: inline-block;
    background: #059669;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .form-container {
        margin: 0;
        border-radius: 0;
    }
    
    .form-header {
        padding: 1.5rem;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .form-content {
        padding: 1.5rem;
    }
    
    fieldset {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        flex: none;
    }
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Success State */
.form-success {
    text-align: center;
    padding: 3rem 2rem;
}

.form-success .success-icon {
    font-size: 4rem;
    color: #059669;
    margin-bottom: 1rem;
}

.form-success h2 {
    color: #059669;
    margin-bottom: 1rem;
}

.form-success p {
    color: #6b7280;
    font-size: 1.1rem;
}