/* ===================================
   Create Topic Styles
   =================================== */

.create-topic-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-tertiary);
}

.create-topic-container {
    width: 100%;
    max-width: 600px;
}

.form-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-header {
    padding: 24px 24px 0;
}

.form-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

#create-topic-form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group .input-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-tertiary);
}

.form-group .input-field:focus {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.form-group .textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
}

.char-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.form-group:focus-within .char-count {
    background: var(--bg-tertiary);
}

.form-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    color: var(--primary-color);
    font-size: 13px;
}

.form-info svg {
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

.form-actions .btn {
    min-width: 120px;
    justify-content: center;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading.hidden {
    display: none;
}

.btn-text.hidden {
    display: none;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .create-topic-main {
        padding: 16px;
    }
    
    .form-header {
        padding: 20px 20px 0;
    }
    
    #create-topic-form {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
