/**
 * TeleWorld Forms CSS
 * Styles for forms and form elements
 */

/* Form Container */
.teleworld-form {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Form Elements */
.teleworld-form input,
.teleworld-form textarea,
.teleworld-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.teleworld-form input:focus,
.teleworld-form textarea:focus,
.teleworld-form select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.teleworld-form input::placeholder,
.teleworld-form textarea::placeholder {
    color: #94a3b8;
}

/* Form Groups */
.teleworld-form .form-group {
    margin-bottom: 1.5rem;
}

.teleworld-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Form Buttons */
.teleworld-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.teleworld-btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.teleworld-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.4);
}

.teleworld-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Messages Container */
.form-messages {
    margin-top: 1rem;
    min-height: 20px;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
    animation: slideIn 0.3s ease;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
    font-weight: 500;
}

/* Alert Types */
.alert-success {
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    border-color: #10b981;
    color: #065f46;
}

.alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #ef4444;
    color: #991b1b;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
    color: #1e40af;
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #f59e0b;
    color: #92400e;
}

/* Form Success Animation */
.form-success {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Validation States */
.teleworld-form input.error,
.teleworld-form textarea.error,
.teleworld-form select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.teleworld-form input.success,
.teleworld-form textarea.success,
.teleworld-form select.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Loading State */
.teleworld-form.loading {
    pointer-events: none;
    opacity: 0.8;
}

.teleworld-form.loading .teleworld-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .teleworld-form {
        padding: 1.5rem;
        margin: 1rem;
    }

    .teleworld-form input,
    .teleworld-form textarea,
    .teleworld-form select {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    .teleworld-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .alert {
        padding: 0.875rem;
    }

    .alert-content {
        gap: 0.5rem;
    }

    .alert-icon {
        font-size: 1.1rem;
    }
}
